• Welcome to Freedom Reborn Archive.
 

Scripting a 'Transmute' spell in FFX

Started by Revenant, June 18, 2007, 02:28:30 AM

Previous topic - Next topic

Revenant

In the ffx.py script, there is an entry for Pan's transmute power..

#special function for pan's transmutations
def getTransmutedionysian(target):
    gender=getGender(target)
    if gender==FFX_GENDER_FEMALE:
        return ('bacchite_red','bacchite_green','bacchite_silver')[randint(0,2)]
    if gender==FFX_GENDER_MALE:
        return 'manbull'
    return ''




Is it okay to just copy that section, and paste your own code right below it? Here's my intended code...


#special function for circe's transmutations
def getTransmutecirce(target):
    gender=getGender(target)
    if gender==FFX_GENDER_FEMALE:
        return 'harpy'
    if gender==FFX_GENDER_MALE:
        return ('tiger','wolf','snake','lion','panther','bird')[randint(0,5)]
    return ''



catwhowalksbyhimself

Yes, that is correct.  I think you'll also need to add some stuff to the customizations file.

Epimethee

> I think you'll also need to add some stuff to the customizations file.

You need to add your entry in ffxdefault.py:
FFX_COMMON_OBJECTS=[
["ffx_green_barricade"],
["ffx_green_burger"],
["ffx_green_car"],
["ffx_green_streetlight"],
["ffx_iron_barricade"],
["ffx_iron_weight"],
["ffx_titanium_bat"],
["ffx_icepatch"],
["ffx_marbles"],
["elemental"],
["bizarre"],
["urban"],
["dionysian"],
["ffx_elem_stone"],
["ffx_elem_metal"],
["ffx_elem_ice"],
["ffx_elem_wood"],
["ffx_elem_plastic"],
["circe"],
]

Interestingly enough, there doen't seem to be any entry to edit in ffxtransmute.py.

Oh, and say hi to Circe for me. ;)

garf

I've got a new computer and am trying to bring FFVTR back up to speed. But I did the above and my Circle just keeps turning people into vases and/or an assorted variety of goons, depending on whether I'm using the Object Lesson power or the Polymorph power as a base. Does anyone have a moment to explain where I'm going wrong? She was turning folks into wolves just fine on my old computer, but for the life of me I can't remember what I did.

stumpy

Do you have the transmute set up as a state swap? It sounds like you are using the in-game objectify and polymorph powers (like Green Genie uses). The FFX transmute is a state swap. It's in the FFX manual and look at Pan's setup in the FFX Control Centre to see an example of how it is done.

And remember that you have to run the Rumble Room power ID generator if your character is a built-in.

Epimethee

Another detail: it won't work on direct attacks or on explosive projectiles' explosion radius.

If it still doesn't work, you can post the content of your script.log file, as the messages may help find where the problem lie.

garf

That's got it -- thanks to Stumpy and Epimethee.

TaskMasterX

BTW, I added a LimeyLure to Transmute Swap in FFX3.2.1 so you can use the Transmute like an Explosive Projectile.

garf

Wow, nice to have options; thanks very much. Now I gotta figure out why the Parasite keeps disappearing on me. He duplicates folks' powers just fine, but when he gets stunned in someone else's guise, instead of reverting he just vanishes. You kinda have to step carefully no matter whose powers you're borrowing ...

Epimethee

Looks like a bug (another sort of parasite...); please post you script.log. Thanks.

garf

Here goes, epimethee -- thanks again for your time. I see an error message near the end at the relevant moment -- "SystemError: NULL result without error in call_object" -- but i don't know what's to be done about it.

>>> 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 1205938928.255000
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 Plugin 'm25enc_opendoor' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
ffx3\sk.py importing FFX
ffx3\missions\scripts\sk.py loaded
>>> C:\Users\Richard Owner\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Skirmish Team Mode.py executed
>>> C:\Users\Richard Owner\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Users\Richard Owner\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Skirmish Team Mode.py executed
>>> OnReceiveSelectedEnemies(('custom_vil_0', 'custom_vil_1', 'custom_vil_2', 'custom_vil_3', ))
SkirmishSpawnEnemy: custom_vil_0 (atom, 1049)
SkirmishSpawnEnemy: custom_vil_1 (deathstroke, 1071)
SkirmishSpawnEnemy: custom_vil_2 (batman, 1075)
SkirmishSpawnEnemy: custom_vil_3 (psycho pirate, 1082)
! GetMapInfo
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_AIRFIELD'
initialising FFX: skirmish=1
mapinfocaliper1 is not a valid explosion object
mapinfocaliper0 is not a valid explosion object
mapinfocaliper2 is not a valid explosion object
mapinfocaliper3 is not a valid explosion object
numberStr=48
storing hero_0: id_1,-48
team1 leader set
team2 leader set
initialising FFQ_initialiseExtras()
FFX_UpdateSun: getting default sun
FFX_UpdateSun: setting = (-40.0, 30.0, 1.20000004768, 1.0, (0.800000011921, 0.5, 0.20000000298))
initAttribsForChar: working on custom_vil_0_1 (atom)
initAttribsForChar (atom): looking at attribute ffqlowgravflier
execInitAttrib: init ffqlowgravflier attribute
    on custom_vil_0_1 of template custom_vil_0 (atom)
initAttribsForChar (atom): looking at attribute ffqfastball
execInitAttrib: init ffqfastball attribute
    on custom_vil_0_1 of template custom_vil_0 (atom)
initAttribsForChar: working on custom_vil_1_2 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute danger sense
initAttribsForChar (deathstroke): looking at attribute nimble
initAttribsForChar (deathstroke): looking at attribute combatskill
execInitAttrib: init combatskill attribute
    on custom_vil_1_2 of template custom_vil_1 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute lesserregeneration
execInitAttrib: init lesserregeneration attribute
    on custom_vil_1_2 of template custom_vil_1 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute powerscan
execInitAttrib: init powerscan attribute
    on custom_vil_1_2 of template custom_vil_1 (deathstroke)
initAttribsForChar: working on custom_vil_2_3 (batman)
initAttribsForChar (batman): looking at attribute combatskill
execInitAttrib: init combatskill attribute
    on custom_vil_2_3 of template custom_vil_2 (batman)
initAttribsForChar (batman): looking at attribute disciplined
initAttribsForChar (batman): looking at attribute extra heroic
initAttribsForChar (batman): looking at attribute grim resolve
initAttribsForChar (batman): looking at attribute ffqropeswinger
execInitAttrib: init ffqropeswinger attribute
    on custom_vil_2_3 of template custom_vil_2 (batman)
initAttribsForChar: working on custom_vil_3_4 (psycho pirate)
initAttribsForChar (psycho pirate): looking at attribute ffqdisguise
execInitAttrib: init ffqdisguise attribute
    on custom_vil_3_4 of template custom_vil_3 (psycho pirate)
getDisguiseLocation(): 'ffq_disguise_location' set to default.
initAttribsForChar (psycho pirate): looking at attribute unheroic
initAttribsForChar: working on hero_0 (parasite)
initAttribsForChar (parasite): looking at attribute unheroic
Plugin 'firehydrant' OnPostInit() called
Plugin 'zombie' has no OnPostInit()
Plugin 'freeroam_keepbuildingdamage' OnPostInit() called
Plugin 'm25ai_lowjumper' has no OnPostInit()
Plugin 'm25ai_realitymanipulation' has no OnPostInit()
Plugin 'cutscene_power' has no OnPostInit()
Plugin 'm25enc_opendoor' has no OnPostInit()
Plugin 'm25enc_simplechoice' has no OnPostInit()
2
1
3
2
TRANSFERAI hero_0 to form_1 (watch=0.000000)
team1 leader set
initAttribsForChar: working on form_1 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute danger sense
initAttribsForChar (deathstroke): looking at attribute nimble
initAttribsForChar (deathstroke): looking at attribute combatskill
execInitAttrib: init combatskill attribute
    on form_1 of template custom_vil_1 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute lesserregeneration
execInitAttrib: init lesserregeneration attribute
    on form_1 of template custom_vil_1 (deathstroke)
initAttribsForChar (deathstroke): looking at attribute powerscan
execInitAttrib: init powerscan attribute
    on form_1 of template custom_vil_1 (deathstroke)
Traceback (innermost last):
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 4820, in execTimer
    exec(event.object)
  File "<string>", line 1, in ?
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 4824, in morph2
    FFX_Spawn(name,template,char)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 22248, in FFX_Spawn
    alignWith(name,obj)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 22270, in alignWith
    Object_SetOrientation(char,angle,(0,0,1))
SystemError: NULL result without error in call_object
cshelper: Cutscene [gameover_cs] submitted for playing
cshelper: Now playing cutscene [gameover_cs]
Step 1 of 3
Step 2 of 3
Step 3 of 3
cshelper: Cutscene [gameover_cs] has ended

Epimethee

Interesting. There's an error in the morphing code, which s looking at an object which doesn't eist or doesn't exist anymore. What attributes does parasite have? There might be some conflict here.

Sadly, I probably won't be able to look into it for a while (out of town for the Easter holiday, plus other RL commitments in the next couple of weeks), but hopefully somebody will. If not, please remind me to check this.

garf

Thanks, Epimethee. Good luck with the real world.