Unit not working [Solved]
Moderator: Moderators
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Unit not working [Solved]
Okay, so I was trying to add the magnaguard with the staff from the infantry assests into my map. Obviously the unit didn't show up. I have not made a single modification to the infantry assests and I also know my lua is correct, because other units from the infantry side are working and I copied and pasted the guys name in just to make sure I didn't have a typo. Any ideas?
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Unit not working... Isn't this a typical problem...
What do the logs say? That aside, my guess is there may be a problem with the unit count somewhere.
-
MasterSaitek009
- Black Sun Slicer
- Posts: 619
- Joined: Wed Aug 23, 2006 4:10 pm
Re: Unit not working... Isn't this a typical problem...
I remember Tean telling me that the Magna uses Maul's animations.
I think the solution was to load Maul(in the lua) before the Magnaguard is loaded.
I think the solution was to load Maul(in the lua) before the Magnaguard is loaded.
-
jedimoose32
- Field Commander

- Posts: 938
- Joined: Thu Jan 24, 2008 12:41 am
- Projects :: Engineering Degree
- Location: The Flatlands of Canada
Re: Unit not working... Isn't this a typical problem...
I don't know...MercuryNoodles wrote:That aside, my guess is there may be a problem with the unit count somewhere.
I've added lots of units to my maps before and haven't done a thing with the unit count and they've worked fine. Along the same topic, is the magnaguard's label cis_inf_magnaguard, or cis_inf_staffguard or anything with _inf_ because once when I tried to add a jedi to the infantry on my map it crashed due to the fact that it had a _hero_ label. Again, I'm no expert, just offering one opinion. I suppose I should have asked, is this unit a shipped asset that you modded or did you acquire it from somewhere else?
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
This is aquired from the conversion pack assests Tean released, however I have found a way to extract units from there lvl files (no don't even bother pming me about this as I won't tell unless its a moderator or something) and it doesn't when I extract that magnaguard, yes I did everything right. I'll try it without using the lvl files and see what happens, but I think I did it before and it didn't show up. Anyways here is my lua and my log is being aquired as we speak so I'll post it when its ready.
Lua:
Lua:
Hidden/Spoiler:
Last edited by woner11 on Tue Apr 01, 2008 12:39 am, edited 1 time in total.
-
Fingerfood
- Sith

- Posts: 1262
- Joined: Fri Nov 30, 2007 9:40 pm
Re: Unit not working... Isn't this a typical problem...
First one, you need some kind of formating. I don't think it'll work with all of it on one line.woner11 wrote: ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\jed.lvl","jed_knight_02")
ReadDataFile("dc:SIDE\\heroes.lvl","rep_hero_fisto","rep_hero_drallig","rep_hero_luminara")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("dc:SIDE\\infantry.lvl","rep_inf_ep3_commander","cis_inf_magnagaurd")
ReadDataFile("dc:SIDE\\geg.lvl",
"cis_hero_grievous")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")
SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_sniper",1, 4},
assault = { "rep_inf_ep3_officer",1, 4},
engineer = { "rep_inf_boss_commando",1, 4},
sniper = { "jed_knight_02",1, 4},
officer = {"rep_hero_luminara",1, 4},
special = { "rep_hero_fisto",1, 4},
AddUnitClass(REP,"rep_inf_ep3_rifleman", 9,25)
},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_sniper",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_magnaguard",1, 4}, }
}
SetHeroClass(CIS, "cis_hero_grievous")
SetHeroClass(REP, "rep_hero_drallig")
And if that doesn't work, it may be a problem that you have TWO MagnaGuards....
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
I ususally do it on one line. And two magnaguards shouldn't matter because they are different units from different sides. It worked fine in the convo pack. Anyway here is my log:
It was too big to put in one post so I have to do two.
Hidden/Spoiler:
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
Log continued and there is some interesting stuff at the bottom.
Edit: I just tried again without the lvl extraction and no luck.
Hidden/Spoiler:
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Unit not working... Isn't this a typical problem...
Definitely a unit count problem. Look:
You have a total max unit count of 45 when the team's unit count is set to 20. The magnaguard doesn't appear because the game fills the other max unit counts and hits the team limit of 20 units before it even gets to the magnaguard.cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_magnaguard",1, 4},
}
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
That is the maximum amount of units the ai can have. It does the first number first, and if there is still space left to go to twenty, then it randomly adds units to it and that is the max for each unit. It is the default in any lua.
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Unit not working... Isn't this a typical problem...
Create a SoldierAnimation pool as well. That should always be one of the first things you do.
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
So would that be like this:
Code: Select all
SetMemoryPoolSize ("SoldierAnimation",20)-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Re: Unit not working... Isn't this a typical problem...
Code: Select all
Message Severity: 2
.\Source\Team.cpp(625)
Team missing class "cis_inf_magnaguard" (check the side's .req file)-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
I just realized that I switched the a and the u around in guard in the lua. It is supposed to be gaurd. Anyways, I'll remunge and see if that works.
EDIT: Yay it works thank you all so much!!!
EDIT: Yay it works thank you all so much!!!
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Unit not working... Isn't this a typical problem...
Yeah, you're right that it does try to fill the minimum first, but it's still worth fixing so you get all of your units on the field. The way it is above could potentially only spawn one magnaguard at any given time, which can also make it seem as if it's not spawning.
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
Right now its on default. By the final product of the map though I will change it. 
-
FragMe!
- Gametoast Staff

- Posts: 2244
- Joined: Sat May 13, 2006 12:34 am
- Projects :: Not sure keep changing my mind.
- xbox live or psn: No gamertag set
- Location: Origin name GT_FragMe
- Contact:
Re: Unit not working... Isn't this a typical problem...
Slightly off topic, but related to your error log file. To get rid of the exceeded max Godrays error have a look at the .fx file for Endor and copy the Godray bits from that to your .fx file. Also the can't find animation (possisbly unused) errors at the of the second part of the log won't (or shouldn't which you found out) crash a map trust me as I try to get a new anim in game I see them a lot.
-
woner11
- Sith

- Posts: 1361
- Joined: Tue Sep 18, 2007 10:17 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: The lost world of pickels
- Contact:
Re: Unit not working... Isn't this a typical problem...
That's good to know thanks! Everything was working and now its crashed however. I think I know what the problem is, so its just a matter of reversing it. Its no big deal though as I know what I did wrong. I tried to slopply make the shotgun into a missle launcher, sort of. Its all very confusing, but I think I sorted it out. So thanks again to everybody who helped out!!!
