• Welcome to Freedom Reborn Archive.
 

utility to convert hero files to built-ins - version 1.3

Started by M25, April 26, 2007, 02:43:42 PM

Previous topic - Next topic

wickerman

Hmmm didn't work for me at all...  session never ended - I waited about 10 mins


script log follows for anyone who might be able to help... thanks!


[spoiler]>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.251000
loading cshelper ...
Starting ffx.py v. 3.2.0 build 11; branch = Gold / Release
Loading m25ai.py v. 3.2.0 build 10; branch = beta 2: m25 branch 2
importing missionobjvar.py v1.18
importing MLOG Reader 1.0.18 release
Starting General Utilities 1.0
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Rumble Room play.
CustomHeadCurrentTime 1179106859.823000
Starting Height Check module 1.4
Starting System Utilities 1.4
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'zombie' imported
Loading freeroam_keepbuildingdamage.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'freeroam_keepbuildingdamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_power' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugins non-fatal error:
    couldn't import plugin 'm25enc_opendoor'
ffx3\sk.py CANNOT import FFX
ffx3\missions\scripts\sk.py loaded
m25gdbm version 1.3
no ffx found
custom aidata found
>>> C:\Documents and Settings\Kuehn\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Add To Dat.py executed
>>> C:\Documents and Settings\Kuehn\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Documents and Settings\Kuehn\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Add To Dat.py executed
>>> OnReceiveSelectedEnemies(('------------', ))
String: ronin_01 already in strings.dat - skipping.
String: ronin_desc_01 already in strings.dat - skipping.
String: ronin_desc2_01 already in strings.dat - skipping.
String: ronin Round House_01 already in strings.dat - skipping.
String: ronin Round House_desc_01 already in strings.dat - skipping.
String: ronin flurry of steel_01 already in strings.dat - skipping.
String: ronin flurry of steel_desc_01 already in strings.dat - skipping.
String: ronin RAM_01 already in strings.dat - skipping.
String: ronin RAM_desc_01 already in strings.dat - skipping.
String: ronin Healing touch_01 already in strings.dat - skipping.
String: ronin Healing touch_desc_01 already in strings.dat - skipping.
String: ronin Right Hook_01 already in strings.dat - skipping.
String: ronin Right Hook_desc_01 already in strings.dat - skipping.
String: ronin Devastating Combo_01 already in strings.dat - skipping.
String: ronin Devastating Combo_desc_01 already in strings.dat - skipping.
String: ronin Pistol bararge_01 already in strings.dat - skipping.
String: ronin Pistol bararge_desc_01 already in strings.dat - skipping.
String: ronin energy grenade_01 already in strings.dat - skipping.
String: ronin energy grenade_desc_01 already in strings.dat - skipping.
Campaign_MakeHeroIndex: Making index <c:\program files\irrational games\freedom force vs the 3rd reich\ffx3\HeroIndexData.txt>
Dat_TransferAI: RONIN has no custom AI.
String: hawkeye_01 already in strings.dat - skipping.
String: hawkeye_desc_01 already in strings.dat - skipping.
String: hawkeye_desc2_01 already in strings.dat - skipping.
String: hawkeye Net Arrow_01 already in strings.dat - skipping.
String: hawkeye Net Arrow_desc_01 already in strings.dat - skipping.
String: hawkeye arrow_01 already in strings.dat - skipping.
String: hawkeye arrow_desc_01 already in strings.dat - skipping.
String: hawkeye Punch_01 already in strings.dat - skipping.
String: hawkeye Punch_desc_01 already in strings.dat - skipping.
String: hawkeye acid arrow_01 already in strings.dat - skipping.
String: hawkeye acid arrow_desc_01 already in strings.dat - skipping.
String: hawkeye triple Shot_01 already in strings.dat - skipping.
String: hawkeye triple Shot_desc_01 already in strings.dat - skipping.
String: hawkeye Electric Arrow_01 already in strings.dat - skipping.
String: hawkeye Electric Arrow_desc_01 already in strings.dat - skipping.
Campaign_MakeHeroIndex: Making index <c:\program files\irrational games\freedom force vs the 3rd reich\ffx3\HeroIndexData.txt>
Dat_TransferAI: Hawkeye has no custom AI.
String: shrapnel_01 already in strings.dat - skipping.
String: shrapnel_desc_01 already in strings.dat - skipping.
String: shrapnel_desc2_01 already in strings.dat - skipping.
String: shrapnel Titanium Armor_01 already in strings.dat - skipping.
String: shrapnel Titanium Armor_desc_01 already in strings.dat - skipping.
String: shrapnel EMP Blast_01 already in strings.dat - skipping.
String: shrapnel EMP Blast_desc_01 already in strings.dat - skipping.
String: shrapnel energy shield_01 already in strings.dat - skipping.
String: shrapnel energy shield_desc_01 already in strings.dat - skipping.
String: shrapnel Cyborg Hook_01 already in strings.dat - skipping.
String: shrapnel Cyborg Hook_desc_01 already in strings.dat - skipping.
String: shrapnel Shrapnel bombs_01 already in strings.dat - skipping.
String: shrapnel Shrapnel bombs_desc_01 already in strings.dat - skipping.
Campaign_MakeHeroIndex: Making index <c:\program files\irrational games\freedom force vs the 3rd reich\ffx3\HeroIndexData.txt>
Traceback (innermost last):
  File "C:\Documents and Settings\Kuehn\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Add To Dat.py", line 85, in AddToDat
    m25gdbm.Dat_Convert_All(chardata.GetCharacterData(char))
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25gdbm.py", line 927, in Dat_Convert_All
    Dat_MoveMesh(cdata)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25gdbm.py", line 977, in Dat_MoveMesh
    shutil.copytree(start, target)
  File ".\System\PythonLib\shutil.py", line 82, in copytree
    os.mkdir(dst)
OSError: [Errno 17] File exists: 'c:\\program files\\irrational games\\freedom force vs the 3rd reich\\ffx3\\art\\library\\characters\\Shrapnel'
[/spoiler]

UnkoMan

Ah, good call JM. I'll have to remember that.

Oh, and Wicker... did you brand all the characters in FFX first? Heck, you probably did and it is some other problem. What do I know for this programmin'?

joemama

Wicker--

It's probably not the problem, but, did you happen to open the hero files using one of the hero tools?  I did (MrBrdo's) and it only worked with characters who had no ffx3 attributes/powers/cusomizations.  Fortunately, I only did on about a dozen files, so it was easy to re-input them manually.

Unko,

I'm anal retentive about updating my strings file, so having this utility do (most) of it for me saves a ton of time!

JM

M25

wickerman:  it looks like the characters were imported.  The tool is supposed to remove the old mesh directory in the mod and then copy the character mesh back into the mod directory (in case you made any changes to the skin/mesh/portrait/head since the last time it was imported).  It failed to remove the directory and then the copy failed.  I'll put in some safeguards for that.

Character and power name issues:
The name that you see in the game comes from strings.dat, and the tool should be using the original names of the characters and powers as the string entries.  You shouldn't see the truncated name at all when playing. 

I'm going to cap power names as well, as that isn't something anyone should have to do manually.  It will still be <truncated character name> <truncated power name> though to help prevent namespace collisions - that is, if I only use a couple of letters from the name of the character, it is much more likely that the powers from different characters will end up with the same name and will overwrite each other.

UnkoMan

I've got to say, I use MrBrdo's tool all the time (mostly for weight changing) and I don't have a problem. Yes, I have to go back into FFX Control Centre after, but I just reimport my py files and it works perfectly.

M25

Version 1.3 is up - see the first post

Character names are now capped at 15 characters.
Power names are capped correctly at 29 characters.
All entries in strings.dat reflect these new lengths, but you'll still see the full original character name and power names in the game.
The issue with not being able to copy over an existing folder has been fixed.
Powers have the 'not for custom' flag set.
Stumpy's melee area fix is applied to any melee area powers.


Previsionary

Very nice update, m25. My only suggestion is this...is it possible to fix the changing of accuracy for melee attacks?

M25

It looks like melee attacks in hero files all have an accuracy of zero (very low), and the built-in characters' melee powers often have it set to zero as well.  I could be wrong, but I don't think the game uses that value for melee attacks.  Speed determines how accurate a melee attack is. 


Previsionary

yes, some heroes/villains do have it set to very low, but a great deal (almost an even amount between the two) have it set to medium and above. From what I can remember from testing, accuracy plays some part as I recall several of my melee characters barely hitting their opponents at a very low setting...and accuracy does affect prestige, so I would hope it effects something. I dunno. :S. However, from what im noticing from the built ins...most of the high powered characters have low accuracy for melees (minuteman, liberty lad (??), supercollider)...so, take that as you will.

catwhowalksbyhimself

I believe melee attacks hit automatically barring a dodge.  Speed is therefore the important factor in determining melee accuracy, as it determins whether that attack can or cannot be dodged.

M25

To put it another way, the tool is not changing the accuracy values.  It's simply copying what is in the hero file.  I can put a different value in its place, but I'm not sure what that should be.

Previsionary

Quote from: M25 on May 17, 2007, 06:32:34 AM
To put it another way, the tool is not changing the accuracy values.  It's simply copying what is in the hero file.  I can put a different value in its place, but I'm not sure what that should be.

I wasn't saying that the tool changed anything, I was certain it wasn't changing that factor. Anyway, don't worry about it. I was just looking at some stuff in game and apparently there isn't an accuracy field for melee...even though I recall there being one. Maybe that was ff1? Anyway, my mistake. :P

catwhowalksbyhimself

There is in FFEdit, but not in the hero editor.  I'm pretty sure it does nothing, it's just there for every attack.

Lunarman

yep the accuracy of the melee attack doesn't change whatever you set the accuracy too. It's the speed which affects melee attack's chance to hit. You can just leave accuracy blank :)

UnkoMan

Okay, here's something odd I've come across.

I have this one hero in paticular... he will get added fine. I check in FFEdit and he looks like he is all there, just like everybody else. Character, template, powers, etc. However, when I go in-game, his name doesn't appear in the characters list. When I have the hero file still in place, however, it does appear, once... and selecting that character will play as the built-in, not the custom.

So, does anybody know what is going on, and how to fix it? If you need more information, I'll be glad to give it.

catwhowalksbyhimself

Check his built-in AI.  Putting the wrong one on him, or none at all, will have exactly that effect.

UnkoMan

His built-in AI is CZeroCost, the same as all the others. His template class is GAME_OBJ_HERO, as well. He seems to be set up in the exact same way as any other hero I've added.

I've even done a test where I started completely from scratch. A brand new folder. I added a bunch of heroes. Everybody worked great except him. Should I, perhaps, just try adding this one paticular character by hand and see what happens?

M25

Look in your strings file (in Lang/English/strings.txt).   Does the character have the right name in there?  What's the name of the character?

joemama

QuoteDoes the character have the right name in there?  What's the name of the character?

maybe it has something to do with spaces and/or _'s in the name?

JM

HumanTon

Also remember that FFEdit hates upper case letters in certain fields.

M25

The tool should be taking care of upper case letters and spaces in hero names.  I'm wondering if there are other special characters/letters that are causing problems.

UnkoMan

The name is "tomato" (yes, THAT Tomato), so I don't know if it is that. There's one power that has hyphens in it, but if that was a problem it'd just mess up that power, yes?

The strings look all good though. Like I said, everything looks exactly the same as all the other characters. In FFEdit and in the strings and... well he's just not showing up in the of characters is all.

M25


Xenolith

Leave it to Tomato to mess up   :ffvstr:  :lol:

UnkoMan

Nope, still nothing. I think I will... stop worrying about this for a while and come back to it later.

catwhowalksbyhimself

Change the AI anyway.

Believe me, FFvTTR does nutty things like that at times. It may very well work.

M25

I downloaded Tomato's hero file and ran it through the conversion.   For some reason the hero file has the 'mock' attribute set to 1.  Go to the templates tab of ffedit and change the 'mock' attribute to '<none>' and set the value to 0. 

I'm not sure how it got set, (different edition of the game?  a third-party hero editor?) but it is preventing the character from showing up in the game.


Epimethee


UnkoMan

Oh, is that all it was? I can't believe it was so simple. Thank you for checking for me, and everybody else for your suggestions.

I noticed that, but had no idea what it was. I haven't really messed with this stuff before. But it's cool learning about it, and this'll be good for future reference.

Does FFEdit have a manual that would cover this sort of stuff (meanings of all the things in templates, etc)? I seem to recall the original game's having one, but admit I never more that glanced at it. If so, where would I locate that to go through it?

Previsionary

Quote from: UnkoMan on May 22, 2007, 11:07:21 PM
Oh, is that all it was? I can't believe it was so simple. Thank you for checking for me, and everybody else for your suggestions.

I noticed that, but had no idea what it was. I haven't really messed with this stuff before. But it's cool learning about it, and this'll be good for future reference.

Does FFEdit have a manual that would cover this sort of stuff (meanings of all the things in templates, etc)? I seem to recall the original game's having one, but admit I never more that glanced at it. If so, where would I locate that to go through it?

check the scripting docs. Every command in ffedit's template tab is defined

|