• Welcome to Freedom Reborn Archive.
 

Mod and Scripting stuff

Started by C4, December 21, 2008, 02:04:56 AM

Previous topic - Next topic

C4

I have a few problems that need help and one little gem to share

First Shapeshifters:

the gem:

syndtalmusuz1_cs = [
(
   "moveTo('avian','syndtalmusuz1')",
   "ff.moveser()",
   "wait(2)",
),
(
   "speak('avian', 'REMSS_07_AV_01')",

def moveser():
   print "moving"
   herolist = getAllHeroes()
   temp = 0
   for hero in herolist:
      if Object_IsAlive(hero):
         if temp == 0:
            moveTo(hero,'syndtalmusuz1')
            temp = 1
         elif temp == 1:
            moveTo(hero,'syndtalmusuz1')
            temp = 2

This allow you to make calls on shapeshifter forms. Pretty useful. It can be further defined by checking for certain templates but for now it does what I need.

Now the problem:
A lot of the time my shapeshifter forms don't get their attributes activated as you shift to them. The first form was fine and the shapeshifting remain intact but attributes the forms have sometimes work, sometimes not.

Also what function can be used to check for when a new char is spawned mid mission to activate ffx on him?


Then I need an altered version of heavy lifter, the +3 is way too much I need a +1 version.
this is what I did copied from the scripted heavy lifter:

####################### Strong Lifter ###########################################

def initstronglifter(char,update=0):
    if update==0:
        str=Object_GetAttr(char,'strength')+1
        if str>9:
            str=9
        Object_SetAttr(char,'strength',str)
        Object_SetAttr(char,'baseStrength',str)
        Object_SetAttr(char,'templateStrength',str)

But this gives +1 strength straight through. Where do you define this should only be for lifting and throwing?
 

Epimethee

Is it for FF1 or FFvsTTR?

Characters should get their FFX attributes etc. initialized automatically when spawned. If they don't... err, something is broken. Both the spawning and attribute detection mechanisms have been redone in FFX 3.2, so the version you're using might matter. Silly question, but are the characters properly branded with the FFX Control Centre?

Heavy Lifter: If you're using FFX 3.2 or 3.3, the scripted version of Heavy Lifter was rewritten by Stumpy to correct this issue.

C4

its FFvsTTR

I am on the last version DR Mike released. Maybe I must upgrade then.

Yes I use the swap my mod to the first mod on the list method to brand them. An I included them in the list in built ins I think.

You think going to the new version should be the solution?     

Epimethee

While upgrading should in theory be reasonably straightforward, since your mod is quite advanced, you might not want to upgrade, as this would mean merging and cleaning many DATs, and risking introducing new bugs. IIRC, Catwhowalksbyhimself mentioned various problems when trying to do the same for Liberty Bay.

For the Heavy Lifter, you can simply backport Stumpy's code. For the spawning issue, though, I don't have any solution (hopefully someone else will); I remember that changing the detection method solved a couple of game-engine-related issues, but can't remember what exactly.

catwhowalksbyhimself

Dr. Mike's last verson is pretty much obsolete as the new FFX team did a lot of things under the hood as well as the new attributes.

But as Epi said, upgrading can be tricky.  Every I attempt I made ended up breaking the whole state swap system, although to this day I don't know why.  Someone successfully got it to work for me.

I'd say it's worth a shot, just do your experimenting on a backup copy of your mod first.

As to scripted heavy lifter, the old version did indeed at a straight 3 strength, but it was fixed in the first team release.  That code is quite safe to transplant from the newest version to the older one, as Epi said, is should be simple enough to alter for your purposes.

ON another note, are you using bonus cannisters?  I have a couple of new ones working for LB and could send the code your way if you want it.