Problem with character templates spawned by FFX script

Started by mac402, July 20, 2012, 11:29:13 AM

Previous topic - Next topic

mac402

Hello everyone.

I'm using  :ffvstr: with FFX 3.3.10. I have recently noted (but it was like that all the time) that whenever you use attributes like shapeshifter, accidental change, gestalt, summoner etc. (generally everything that is somehow summoned or created by FFX script) the characters created end up with messed up damage stats to their attacks. The attacks of such chars do about half their original damage. Whenever these same characters are used in normal fashion (like selected for mission, not as temporary forms etc.) everything works correctly.

Now I checked an archive topic on the net, where it is said that it's because of custom characters which the script reads from their hero files, not their custom_template and thus the damage is calculated with the base of 0. So supposedly this is not going to happen with built-in characters. Unfortunately when I converted my custom characters to built-ins it is still happening, and now some characters can't even move properly on some maps  :banghead:. Again, when used in normal fashion these chars are perfectly fine in all aspects. First I did a conversion with EZHero Tool, then did everything manually and the effect is still the same. When created with script damage power of a hero is lowered. Only characters created by mimic attribute do correct damage. The same seems to be true with FFX built-in stuff. On the other hand if I select an original  :ffvstr: character like say mentor for a temporary form his damage stats are correct when created, so I think there is a way to remedy that somehow.

I would greately appreciate any suggestions. Can this be fixed or is it a game issue that nothing can be done with. Thanks.

stumpy

It's been a while since I looked at this, but there are a few issues that appear in the game, related to how heroes use powers. I think that the main one was that custom heroes (that is, from hero files) that are spawned in the Rumble Room can end up using an imperfect template that sets their power "level" for each power to 0 (as if there were a level below 1 when you are buying powers). I had thought that creating the character and his powers in FFEdit fixed that problem, though there was also a problem that characters from the RR "Enemies" list had some issue because the game copies them to a custom_villain template or something similar in order to flip their AI and that copy was imperfect, too. Someone else likely has more familiarity with this than I do.

What game difficulty level are you testing at? Are you doing this in the RR? If so, which RR session are you running? Are the characters put on the Enemies list? Are they built-in heroes or custom heroes? I know you said you converted the customs to built-ins, but you may want to check in FFEdit that the power levels for the character are set properly in the Characters tab and that the powers themselves are set up the way you think. And, make sure the names of the custom and built-in versions are different and that you have re-run the FFX Control Centre to re-brand the character after adding him to the built-ins. I you could give the details of the power (and the character stats and attributes if they affect the power, e.g. strength for melee powers) along with the damage you are seeing, it may help someone reproduce the issue you are having.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

mac402

Thanks for your quick reply. I tested the characters both in rumble room and in the campaign with the same results. I usually play at 'very hard', but I tried using other difficulty levels which changed nothing in this behaviour. I am currently using built-in characters. The templates are classified as GAME_OBJ_HERO, characters have campaign only box checked and appear on the hero list. When I check the powers tab of these characters in game the powers are set the way I want them to be. I have moved the custom versions of the built-ins to a different folder than "Heroes" so there are no double names. I used FFX Control Centre, used M25 Power ID Generator and added M25AI code to m25aidata.py. When not used as a script created template but assigned to a mission by me these characters work perfectly like I want them to. Here are some examples:

Hulk has strength 10 and an attack "smash":
damage type: crushing
magnitude: low
ep cost: none
stun: medium
knockback: high
swiftness: slow
arc: none
level: 3

When I select Hulk and play him (in RR on very hard) his attack does 18 damage to flesh creatures with 27% chance stun (according to the game bar). When the same character is created via Dr Banner's 'Accidental Change' attribute the very same attack does 9 damage and has 8% chance stun.

Batman_lantern (energy score 7 and 'light speed' attribute) has an attack "emerlad beam":
damage type: energy
magnitude: very high
ep cost: low
stun: none
knockback: high
velocity: fast
range: long
accuracy: medium
level: 3

This character picked in RR uses his attack on flesh creatures with damage of 45. When he is created with 'gestalt' command of regular batman on a gl power lantern object the batman_lantern created uses this attack with damage 22.

Diamond_form has Str 5 and a melee attack:
damage type: crushing
magnitude: low
ep cost: none
stun: none
knockback: medium
swiftness: fast
arc: none
level: 3

It does 10 damage against flesh. When it is used as Emma Frost's temporary form it does 5 damage against flesh. This character then also has problems with moving on some maps i.e. Downtown by Conduit. There is no movement problem when not used as a script created template or back when it was a custom character.

Generally every attack type (area,damage,melee) and every damage type is halved. Here is an example of a working character who is already in the game. Mentor has a 'psyche-slash' attack:
damage type: energy
magnitude: low
ep cost: none
stun: none
knockback: none
swiftness: normal
arc: none
level: 3

This attack does 28 energy damage against flesh in RR session. When used as script created template his attack also does 28 damage points - that makes me wonder if it is possible to do something to get my own templates to be read correctly.

I hope the above examples will help somehow.

mac402

I did some progress here. Like you said Stumpy, FFX has problems with spawning templates that are GAME_OBJ_MINIONS. While it spawns original FFvsT3R heroes like Minuteman, El-Diablo etc. without messing up their powers damage, it messes characters like thug_with_gun, thug_with_bat etc. In the characters tab in FFEdit I copied the working FF characters and changed them to my built-ins. Previously I used the "New" command or the EZHero export feature. That has fixed some problems, like in all maps my tempforms/summons can now move properly (so is it because of the new FFEdit lacking the allowed/preffered terrain settings?). I can now get these tempforms to work correctly (proper damage) in the Campaign but not in the RR. I am still wondering why the original heroes from FFvsT3R can be spawned by FFX in RR and they work correctly. I noticed that the original game 'Data' folder has a file called charactercache.dat. It is not present in mod folders. Anyone knows what does it do?

stumpy

I don't know (or don't remember) what charactercache.dat is, but I know the one on my install hasn't changed since 2004 (before the game's official release), which means it probably isn't keeping track of character power levels. Then again, this computer isn't the one I originally had the game installed on, so I might have installed FFvT3R and then immediately installed FFX...

BTW, those power levels are stored in the saved games, but I wonder if the part of the engine that sets up the Rumble Room never bothered to take into account the need for persistent data the way the campaigns do.

You are probably on the right track in trying to figure out what the difference is between the built-in Irrational characters that seem to work and the built-in characters that don't work. They really ought to be the same, so it's certainly possible that some file in the Data mod isn't present in the FFX (or whatever) module and that's where the difference lays.

You know, if that approach doesn't yield results, it would certainly be possible to deal with this issue via scripting. By 'possible', I mean I don't see any insurmountable hurdles, not that it would be necessarily be easy. The approach that comes to mind is to write a script that runs offline to adjust the built-in powers for RR use. That is, copy powers.dat to powers_original.dat and then use the power reading and re-writing code available by importing the datfiles module to loop through the powers and boost them according to the level read from the character data (in characters.dat). For some powers and levels, it would be approximate, but it should be closer to the intended power levels than the present system.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg

Icefox

Umm yea something goes here right...
[img]http://hiei4.homestead.com/files/icefox500.gif[/img]