SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Dark_Phantom on February 14, 2013, 05:05:37 PM

Title: Locals not spawning?
Post by: Dark_Phantom on February 14, 2013, 05:05:37 PM
I'm having an issue with my level... it's very odd.
    ReadDataFile("SIDE\\wok.lvl",
        "wok_inf_basic");

--  Local Stats
    SetTeamName(3, "locals")
    SetTeamIcon(3, "all_icon")
    AddUnitClass(3, "wok_inf_warrior", 3)
    AddUnitClass(3, "wok_inf_mechanic", 5)
    AddUnitClass(3, "wok_inf_rocketeer", 3)
    SetUnitCount(3, 11)
    SetTeamAsEnemy(3,ATT)
    SetTeamAsFriend(3,DEF)


This is just a small excerpt from my whole script.  When I spawn as a Friend, no Wookiees spawn.  When I spawn as the Enemy, 3 Wookiees spawn every time.  :dry:
Does the amount of reinforcements on the ally team have an impact on whether locals spawn?  Friendly has 1 reinforcement point in the match.  Its the only thing I can think of for this problem.  I'm going to see what happens when I remove the SetTeamAsFriend and create separate cps for them.
Title: Re: Locals not spawning?
Post by: Phobos on February 14, 2013, 05:12:34 PM
Quote from: Dark_Phantom on February 14, 2013, 05:05:37 PM
I'm having an issue with my level... it's very odd.
    ReadDataFile("SIDE\\wok.lvl",
        "wok_inf_basic");

--  Local Stats
    SetTeamName(3, "locals")
    SetTeamIcon(3, "all_icon")
    AddUnitClass(3, "wok_inf_warrior", 3)
    AddUnitClass(3, "wok_inf_mechanic", 5)
    AddUnitClass(3, "wok_inf_rocketeer", 3)
    SetUnitCount(3, 11)
    SetTeamAsEnemy(3,ATT)
    SetTeamAsFriend(3,DEF)


This is just a small excerpt from my whole script.  When I spawn as a Friend, no Wookiees spawn.  When I spawn as the Enemy, 3 Wookiees spawn every time.  :dry:
Does the amount of reinforcements on the ally team have an impact on whether locals spawn?  Friendly has 1 reinforcement point in the match.  Its the only thing I can think of for this problem.  I'm going to see what happens when I remove the SetTeamAsFriend and create separate cps for them.
The number of reinforcements on a team allied with locals will limit the amount of locals spawned. If you have only 1 reinforcement on the friendly team spawn then only 1 local is going to spawn at once. If the locals are not allied then their max deployed reinforcements are not limited by the other team's. I ran into this problem with one of my maps and basically just added a few dummy AI to the other team so that 7 would spawn on each side.

So to get 11 wookiees spawning at once you will have to either make the allied team have at least 11 AI spawned at once OR remove the SetTeamAsFriend for the locals.
Title: Re: Locals not spawning?
Post by: Dark_Phantom on February 14, 2013, 05:17:08 PM
When you remove SetTeamAsFriend they try to gun you down.  :o
I guess if you aren't a friend you are an enemy. 
Edit: I found something:  Maybe SetTeamAsNeutral ?
Title: Re: Locals not spawning?
Post by: Phobos on February 14, 2013, 05:27:24 PM
Quote from: Dark_Phantom on February 14, 2013, 05:17:08 PM
When you remove SetTeamAsFriend they try to gun you down.  :o
I guess if you aren't a friend you are an enemy. 
Edit: I found something:  Maybe SetTeamAsNeutral ?
Haven't tested that let me know if it works
Title: Re: Locals not spawning?
Post by: Dark_Phantom on February 14, 2013, 05:29:01 PM
They make your reticule turn red still, but they don't shoot you, therefore bypassing the need for dummy AI.  So it works :)
Edit: you get credit for killing the neutral team LoL
Title: Re: Locals not spawning?
Post by: RepComm on February 14, 2013, 05:39:01 PM
That sounds like a fun line to toy around with :D
Title: Re: Locals not spawning?
Post by: Phobos on February 14, 2013, 05:46:20 PM
Quote from: Dark_Phantom on February 14, 2013, 05:29:01 PM
They make your reticule turn red still, but they don't shoot you, therefore bypassing the need for dummy AI.  So it works :)
Edit: you get credit for killing the neutral team LoL
Nice find I'll be sure to use it for another map. The dummy AI are actually designed as semi-powerful 'goons' to complement the main enemy so I won't be removing them from that particular map.

Actually them not shooting you wouldn't work for my particular set up.  :confused:
Title: Re: Locals not spawning?
Post by: Sereja on February 14, 2013, 06:05:17 PM
Setting locals, as Neutral, make them still friendly, but much more selfish. They will not attak your team, but may capture your CP's.
Actualy, if everything done correct, reticule, targeted on them, shold stay blue.
But you surely miss some "relationship lines" lines.
SetTeamAsEnemy(3,ATT) -- mean locals think: "attakers are enemy".
SetTeamAsFriend(3,DEF) --  mean locals think: "defenders are friends".
Next, you should add:
SetTeamAsEnemy(ATT,3) -- mean attakers think: "locals are enemy".
SetTeamAsFriend(DEF,3) --  mean defenders think: "locals are friends".
Title: Re: Locals not spawning?
Post by: RepComm on February 14, 2013, 06:42:31 PM
What happens if you use all 3 options on the same local?

Like making them neutral, friends, and enemys for one specific team?
Would that crash the ExE file?
Title: Re: Locals not spawning?
Post by: Sereja on February 14, 2013, 07:03:15 PM
I never try, it, but most likely, game just will skip all duplicate lines, and choose only one of them. The game, reads Mission.LUA, as a scroll, so, it always choose, any first line abowe... Still, crash possibility, as usual = 50%.
Title: Re: Locals not spawning?
Post by: Phobos on April 23, 2014, 01:03:00 PM
Quote from: Sereja on February 14, 2013, 06:05:17 PM
Setting locals, as Neutral, make them still friendly, but much more selfish. They will not attak your team, but may capture your CP's.
Actualy, if everything done correct, reticule, targeted on them, shold stay blue.
But you surely miss some "relationship lines" lines.
SetTeamAsEnemy(3,ATT) -- mean locals think: "attakers are enemy".
SetTeamAsFriend(3,DEF) --  mean locals think: "defenders are friends".
Next, you should add:
SetTeamAsEnemy(ATT,3) -- mean attakers think: "locals are enemy".
SetTeamAsFriend(DEF,3) --  mean defenders think: "locals are friends".
Is there a way to make it so when you use these lines
SetTeamAsNeutral(DEF,3)
SetTeamAsNeutral(3,DEF)

defenders and locals will not attack each other's team, and also NOT take their command posts? They should only take posts from ATT.

Using this ODF code disables CPs but only globally for each unit, not based on the LUA diplomacy.
CapturePosts            = 0
Title: Re: Locals not spawning?
Post by: Sereja on April 23, 2014, 02:21:31 PM
I guess, if DEF or ATK, will be Neutral, they will be unharmed by opposite team, start spawn at enemy CP, capture them, and cause fast game end.
If this line: CapturePosts   = 0 , sets for Neutral unit, he may loose his ability, but not his will. After such unit will find the CP, he will start to standing there, and do not move to anywhere else, causing "meditation club".
EhPortal 1.34 © 2025, WebDev