• Welcome to Freedom Reborn Archive.
 

Max Characters in Campaign Mission

Started by GogglesPizanno, December 21, 2007, 01:40:09 AM

Previous topic - Next topic

GogglesPizanno

So Im playing around with some EZScript Campaign stuff in FFvTR, and on the campaign tab there is a setting for "Max Heroes"
Now I coulda swore that it was a number that a player could select UP TO that many. But in all my tests its forcing you to choose the exact number its set to.

So for example, I want a mission to be able to be played by 1,2,3 or 4 characters (depending on how many heroes the player wants to choose)
If I set the Max Heroes value to 4, it requires the player to use exactly 4 heroes before the mission start button ungreys itself.

Has it always been that way?
Or am I missing something obvious (like setting it to -1 or something wacky like that)?
The documentation doesn't really elaborate too much.

Previsionary

As far as I can remember (and I'm rusty now), it has always been "exactly" the number you put in even in FF1.


tommyboy

My recollection varies from the Pre's, (but may be wrong).
I thought that in FF "maxheroes" was UP TO that number, but in FFV3R it became the number only.

wickerman

I believe TommyBoy is right.  I seem to remember some grumbling upon FFVTTR's release that you HAD to fill your roster at team selection or you could not enter the mission.

Previsionary

so I reinstalled ff1, the 1.2 patch, ffx, and the transformers mod to test and both Wicker and Tommy are correct. I've grown so accustomed to FFVTTR's setup that everything ff1 is slowly being wiped out.  :o

GogglesPizanno

QuoteI thought that in FF "maxheroes" was UP TO that number, but in FFV3R it became the number only.

grumble grumble grumble...  :banghead:




Epimethee

Never realized this. Of course, I played the first campaign much more than the second.

Crude workaround, but maybe you could create a zero-cost hero to selected. You could also code an FFX attribute for him which would simply remove him when the mission start.

stumpy

Epimethee beat me to it, but I agree that that would be a pretty easy solution.  Create an attribute in FFEdit called seatfiller whose cost is -49 CP. That way, the cost of a character with minimal stats and no other attributes or powers would be 1, which is the game minimum. (Which, BTW, I just found out with a cute error telling me I was a "naughty person" when I tried to create a character of cost 0.  :lol:)

Anyway, this may be the simplest scripted attribute in the history of FFX, but here's what I came up with

######################################## SEAT FILLER ##########################################

# stumpy 2007-12-21: see http://freedomreborn.net/archive/index.php?topic=45618.0
# This is for a character that players can choose to take on a mission
# when all they want is to take a smaller squad. So they can recruit a
# character (or more than one) with this attribute and, right after the
# character spawns, he vanishes, leaving the other "real"
# characters for the squad.

# FFEdit attribute name and cost: seatfiller -49 CP
# strings.txt entries
# attrib_seatfiller_01, seat filler
# attrib_seatfiller_desc_01, this character exists only to fill out the squad roster and will disappear as soon as he is spawned. (for use when you don't to take as many characters as required for the squad)

def initseatfiller(char,update=0):
    Object_Destroy(char)


I suppose, if one wanted to be fancier, using the same mesh as the ffx_tiggot would prevent the character from being visible for that first second or so while FFX starts...

BTW, I remember asking about this one on FFans when FFvT3R first came out, since I always enjoyed soloing some of the campaign missions in FF. As I recall, IrrationalAlexx mentioned that it was never really supposed to work that way in the first game, and that this was a fix...

GogglesPizanno

I just tried it out, and it works like a charm.
A big thanks to you guys.

And frankly if the the first games behavior was a bug, its one they never should have "fixed."
I definitely prefer this way better.

**Edit**
Through sheer dumb luck (and a typo) I figured out an alternate way that while not terribly proper, I think it may actually work better.
I created the "seatfiller" characters as campaign only built in characters in FFEdit. I made 3 of them so you can never use them to fill all four slots in a campaign mission.

It works fine. There is about a second or two where there are 3 members of your team that then disappear.
The down side, is that these seatfiller characters show up in the experience list of the team.
And (this is unconfirmed) it looks like the minion creation code in EZScript missions may be taking into account the extra 3 team members and generating more minions than needed (This is all based on the minions that were spawned in that it seemed a bit overly one sided for a single character)... But I may just be crazy there.

However, due to a typo when I was testing some stuff out in my mission script, I accidentally "recruited" 3 characters that didn't exist...at all...anywhere...just made up character names. But lo and behold, there they were in my list of available characters. Hmmmm I thought. OK I'll add them to the squad with one real character and see what happens. It totally worked exactly the same, only without the scripting, or use of an atribute or anything. The game saw these non characters as viable for recruiting pourposes (and hence entering a mission), but when the game engine started, it just threw that data out as if it were nothing.

It spits out a "FF: CGameTypeCampaign::postObjectsLoaded(): unable to find character def..." error to the ff.log but didn't break gameplay or anything.

Its as if they fixed the FF1 code for the the "Enter the fray" button, but if you can get around that and actually enter the fray, it still behaves like FF1.