Page 1 of 1

How do I add more units to space battle? [Solved]

Posted: Tue Aug 27, 2013 9:06 pm
by 1234567890
Hi, I am trying to make a new space map, but i want to add more units to the map. In the lua, it says pilot: cis_... and marine cis_... (you get the picture) I want to add other units like jedi. Do you have to load the units into the sides folder manually? I tried just putting things like jedi1: cis_hero_countdooku etc below the pilot and marine choices, and of course loading the from side\\cis and side\\rep. any suggestions?

Also, in ground maps, i cant get atats to spawn, other vehicles will but not atats any suggestions

in space maps, I cant seem to change the default sky, i tried getting the sky file i wanted and changing the name to abc.sky but it didnt work

one more thing, how do you get more units to spawn at once? I know in the lua you can change the number of reinforcements and how many ai there are, but it does not seem to change the actual number of units that are on a battle field at a given time.

thanks for reading this even if you have no answers

Re: help adding more units to space battle

Posted: Tue Aug 27, 2013 10:30 pm
by lucasfart
Welcome to GT! A lot of your questions are actually answered in the FAQ topic at the top of the Modding section. In particular, here are the ones you'll want:

How to Add More than 6 selectable Units to a Map (FAQ)

Having more AI on the battlefield than just 32... (FAQ)

As for your other questions, I'd definitely recommend using the search function. It really helps with little issues like that! For command vehicles like atat's and atte's, you need to add a line to your lua.

Code: Select all

SetMemoryPoolSize("CommandWalker", *)
where * is the number of atats you have.

Also, if you look 4 posts down from yours, you'll find a topic all about setting up sky files. :)

Re: help adding more units to space battle

Posted: Wed Aug 28, 2013 4:50 pm
by 1234567890
thank you, you helped in every question

EDIT
I got more units to spawn, but I could not get the extra ones to spawn. attached is my lua, any suggestions?
also, I still cant seem to get the sky to work, it is always tatooine sky. I searched for help with sky files, and I only get help with ground sky. Is it different for space sky?
also, now that more units have spawned (again this is a space map) very few of them seem to enter the vehicles, what do i do?
thanks


lua:

Code: Select all

myTeamConfig = {
    rep = {
        team = REP,
        units = 100,
        reinforcements = -1,
        pilot    = { "rep_inf_ep3_pilot",48},
        marine   = { "rep_inf_ep3_marine",48},
    },
    cis = {
        team = CIS,
        units = 100,
        reinforcements = -1,
        pilot    = { "cis_inf_pilot",48},
        marine   = { "cis_inf_marine",48},
    }
}

AddUnitClass(CIS, "cis_hero_countdooku",1,4)
AddUnitClass(REP, "rep_hero_anakin",1,4)
AddUnitClass(CIS, "cis_hero_grievous",1,4)
AddUnitClass(REP, "rep_hero_obiwan",1,4)
Double posting is against the RULES; please EDIT your post instead -Staff

Re: help adding more units to space battle

Posted: Wed Aug 28, 2013 6:58 pm
by lucasfart
Can't really help you with space maps, sorry. I've never actually made one. In that thread I linked you to though, he managed to use a space sky in a ground map, so I can't see why it wouldn't work in reverse (unless the space skies need extra files or details in the mesh). Someone actually released a custom space skydome over in the asset release thread. You should give that a try...

As far as your units not spawning, did you add them to the list in your ReadDataFile section? I'm guessing you're trying to use them without first having told the game to load them. To fix it find

Code: Select all

ReadDataFile("SIDE\\cis.lvl",
And under that line (somewhere before the brackets close) add a new line and add your hero units to the list (don't forget the comma afterwards!). So as an example, it might look something like this (except with different units called):

Code: Select all

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_hero_grievous",
"cis_hero_countdooku")
Just do the same for the republic heroes, except they should go in the rep.lvl section. :)

Re: help adding more units to space battle

Posted: Wed Aug 28, 2013 9:19 pm
by 1234567890
thanks so much for your help so far, but I still am unable to get the extra units to spawn, i loaded them like you said, I know its possible since other maps ive played have it, but I cant seem to get it. Any other suggestions? thanks again!
o and i got the sky working!

Re: help adding more units to space battle

Posted: Thu Aug 29, 2013 2:02 am
by lucasfart
Good to hear. :) Post your lua, and we'll see if we can spot the problem. Also, have there been any error messages that pop up when you munge the lua? If you made a grammar mistake, you can usually tell from the munge...

Re: help adding more units to space battle

Posted: Thu Aug 29, 2013 9:47 am
by 1234567890
here is most of my lua (excluding sound and stuff)
you might see a few repeats because i tried a couple different stuff
Hidden/Spoiler:
[code] ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_fly_anakinstarfighter_sc",
"rep_hero_obiwan",
"rep_hero_anakin",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal",
"rep_fly_gunship_sc",
"rep_fly_vwing")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"cis_fly_droidfighter_sc",
"cis_fly_droidgunship",
"cis_fly_greviousfighter",
"cis_hero_countdooku",
"cis_hero_grievous",
"cis_fly_tridroidfighter")
ReadDataFile("dc:SIDE\\rep.lvl", "rep_hero_obiwan")
ReadDataFile("dc:SIDE\\rep.lvl", "rep_hero_anakin")
ReadDataFile("dc:SIDE\\cis.lvl", "cis_hero_countdooku")
ReadDataFile("dc:SIDE\\cis.lvl", "cis_hero_grievous")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
rep = {
team = REP,
units = 100,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",48},
marine = { "rep_inf_ep3_marine",48},
AddUnitClass(REP, "rep_hero_anakin",1,4),
AddUnitClass(REP, "rep_hero_obiwan",1,4),
},
cis = {
team = CIS,
units = 100,
reinforcements = -1,
pilot = { "cis_inf_pilot",48},
marine = { "cis_inf_marine",48},
AddUnitClass(CIS, "cis_hero_countdooku",1,4),
AddUnitClass(CIS, "cis_hero_grievous",1,4),
}
}

AddUnitClass(CIS, "cis_hero_countdooku",1,4)
AddUnitClass(CIS, "cis_hero_grievous",1,4)
AddUnitClass(REP, "rep_hero_anakin",1,4)
AddUnitClass(REP, "rep_hero_obiwan",1,4)

ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--CIS turrets[/code]

Re: help adding more units to space battle

Posted: Thu Aug 29, 2013 10:01 am
by ARCTroopaNate
Hidden/Spoiler:
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_fly_anakinstarfighter_sc",
"rep_hero_obiwan",
"rep_hero_anakin",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal",
"rep_fly_gunship_sc",
"rep_fly_vwing")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"cis_fly_droidfighter_sc",
"cis_fly_droidgunship",
"cis_fly_greviousfighter",
"cis_hero_countdooku",
"cis_hero_grievous",
"cis_fly_tridroidfighter")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof"
)
end

myTeamConfig = {
rep = {
team = REP,
units = 100,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",48},
marine = { "rep_inf_ep3_marine",48},
officer = { "rep_hero_anakin",1,4},
special = { "rep_hero_obiwan",1,4},

},
cis = {
team = CIS,
units = 100,
reinforcements = -1,
pilot = { "cis_inf_pilot",48},
marine = { "cis_inf_marine",48},
officer = { "cis_hero_countdooku",1,4},
special = { "cis_hero_grievous",1,4},
}
}
Try that.

Battle of Coruscant?

Re: help adding more units to space battle

Posted: Thu Aug 29, 2013 6:34 pm
by 1234567890
yes it is the battle of coruscant,
Yesssss, they spawn!! thanks!
I only have two more problems. I tried searching for them and found nothing. :(
First, I have a lot of units spawning, most of them just stand there and they dont enter the ships,
how can i make more of them enter ships (there are plenty of ships)
Second, The jedis spawn, but their lightsabers do no damage. (unless you do saber throw) other than force powers, there is no lightsaber damage.

Re: help adding more units to space battle

Posted: Thu Aug 29, 2013 8:31 pm
by ARCTroopaNate
You might have to do something with the combos for the jedi, I've had similar problems with jedi in space battles.
Hidden/Spoiler:
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo
Try putting that before
ReadDataFile("ingame.lvl")

Re: help adding more units to space battle

Posted: Sun Sep 01, 2013 2:42 pm
by 1234567890
it worked, thanks