News:

Rings of Reznor!

Main Menu

randomizing the list for ffx

Started by bearded, April 09, 2009, 07:29:20 PM

Previous topic - Next topic

bearded

is there a way to randomize the template lists for the ffx in some of the custom attributes, such as; private army, guardian angel, summon ally?

as a custom spawn i have this:
def Call_mercenary(spawnName, dude):
heroesList = getAllHeroes()
heronum = len(heroesList)
if heronum <= 3:
Campaign_AddPrestige(-100)
heroList = GetMercList()
randMarker = 7
gotoMarker = "hero_" + `randMarker`
dude = heroList.pop(randint(0, len(heroList)-1))
Object_Spawn(dude, dude, gotoMarker)
AI_MakeIntoHero(dude)
NextStage()

and i see in private army the variables are called 'name', and 'template'.  how could i substitute the above with a merc list and the variable dude with the private army name?  could i simply insert the above in the ffxS code?  maybe something to do with 'getarmyname'?

Epimethee

> is there a way to randomize the template lists for the ffx in some of the custom attributes, such as; private army, guardian angel, summon ally?
Yes, we can! ...err, sorry, yes, it is possible, but you'll need to customize the code (say, by adding checks for a name being "random" or, more usefully, a list from which to pick, e.g. "iron_clothes, black_sheep, red_herring").

As for your second question, I'm not sure I understand you fully here; it's a bit hard without seeing your GetMercList() code. Is this attribute only for one specific character?
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

bearded

i thought somehow that the code presented could be used to determine character sets from a list.  it's a bit over my head how to do so, however.

Epimethee

Actually, no worry, it's probably reasonably simple (that is, once you've has the chance to play around with the basic code concepts*). But the actual code required will change based on what you want to do precisely, the whole of your relevant code and whether if it's for a specific character or for a general-purpose attribute usable for custom characters (the former being often much easier), hence my questions.

*: For example, since I had no example of uses of the Python dictionary data format in FFX (back in the 1.x -2.3 days), it took me the longest time to actually "get" where to use them.
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

bearded

ah, the code is for any character, i applied it to the guardhouse building.

bearded

i think i have a way to do it.  if i have the avengers mansion as an object, with the custom spawn on it with a list of avengers.
is there a way to set up summon or private army with a building as the summoned/spawned?