Page 1 of 1

Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 12:50 pm
by Par3210
Hey. I have heard of people asking how to add Ubermode, and this tut shows you how in more detail.
Here's a tut I wrote for a friend who wanted to know how.
This is off my World war 2 lua. So open your lua of the mode you want to edit, for instance ABCc_con.lua, located in C:\BF2_ModTools\data_ABC\Common\scripts\ABC, and scroll to this section.
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)

conquest:Start()

EnableSPHeroRules()

end

Now add this to there, and you're done part 1 :wink:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)

SetUberMode(1);

conquest:Start()

EnableSPHeroRules()

end
Next, go to the setup teams section.
These are my units.
Hidden/Spoiler:
all = {
team = ALL,
units = 20,
reinforcements = 500,
soldier = { "rep_inf_ep3_rifleman",24, 55},
assault = { "rep_inf_ep3_rocketeer",1, 3},
engineer = { "rep_inf_ep3_engineer",1, 5},
sniper = { "rep_inf_ep3_sniper",1, 3},
officer = {"rep_inf_ep3_officer",1, 3},
special = { "rep_inf_ep3_jettrooper",1, 3},
},
imp = {
team = IMP,
units = 20,
reinforcements = 500,
soldier = { "cis_inf_ep2_rifleman",9, 25},
assault = { "cis_inf_ep2_rocketeer",1, 10},
engineer = { "cis_inf_ep2_engineer",1, 20},
sniper = { "cis_inf_ep2_sniper",1, 10},
officer = {"cis_inf_ep2_officer",1, 10},
special = { "cis_inf_ep2_jettrooper",1, 5},
for instance.
special = { "cis_inf_ep2_jettrooper",1, 5},
The 1 is the minimum amount of units allowed on the battlefield, and the 5 is the max, or most. Change the numbers to however you want, and then change this:
team = IMP,
units = 20,
To what you want as well.
team = IMP,
units = 100,
Hope this helps. :wink:

Ooh. One more thing, remember to substitute the ABC I used in this tut for your 3 letter map name. :thumbs:
If this is either too complicated, or whatever, just tell me and I'll do my best to make it better.

Useful tips:
When you have Ubermode activated you cannot change unit counts or make no AI. You will have to deactivate it.
Having Ubermode on may make units crash or cause lag and other problems online. Singleplayer will work fine, however.

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 12:54 pm
by Executer94
nice tut

good for beginers :)

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 12:55 pm
by Par3210
Thank you. :)

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 12:59 pm
by StarkillerMarek
I would say this is a pretty good tutorial, but someone could just look at a script and see how.

What I mean is it doesn't seem to teach beginners that you should learn how to do the easy stuff(or even the hard stuff) for yourself.

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:00 pm
by Par3210
Ah. Well, I just thought if someone is REALLY new to modding like some of my friends they might not be able to go through a script and see how, so this tut kinda explains the whole lot. :oops:

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:02 pm
by theultimat
There already is a tutorial here. I'm not saying your's is bad or any of that, just letting you know. :wink:

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:04 pm
by StarkillerMarek
Par3210 wrote:Ah. Well, I just thought if someone is REALLY new to modding like some of my friends they might not be able to go through a script and see how, so this tut kinda explains the whole lot. :oops:
I would say that first time mappers should focus more on the map itself before they start going crazy with the game modes.

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:06 pm
by theultimat
StarkillerMarek wrote:
Par3210 wrote:Ah. Well, I just thought if someone is REALLY new to modding like some of my friends they might not be able to go through a script and see how, so this tut kinda explains the whole lot. :oops:
I would say that first time mappers should focus more on the map itself before they start going crazy with the game modes.
But if they did want to know, this would help them out. :wink:

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:07 pm
by Par3210
Yes, I know, I thought about that before posting.. but this goes into a slightly bit more detail. Also I've colour coded it for easier use, and no confusion :P
I would say that first time mappers should focus more on the map itself before they start going crazy with the game modes.
I agree, but like me, people sometimes fiddle around and find things out, and perhaps people could use this tut to get some good sized battles in after they have created their map.
But if they did want to know, this would help them out. :wink:
This is also true, :wink:

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:25 pm
by StarkillerMarek
Then let them find it out. I am sorry, but this tutorial is almost useless. Everything that beginners need is in the documentation. If you are good enough at making maps, then you have already probably figured this out. I don't recall modding being something that someone spoon feeds you on. And I don't think that this website should spoon feed.

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:36 pm
by sampip
and if there was a beginner somewhere who wanted to make a massive map with loads of units... then this tutorial is extremely useful! i used uber mode in my first map. its literally adding and changing a few lines in the script. to be honest, no beginner could ever work out how to get uber mode working unless they were very advanced in scripting. this tutorial, is intended for those who need it/want it, if you don't, don't read it...

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 1:40 pm
by Par3210
Thanks for the critizim and nice comments. Starkiller, this isn't spoon fed, all tuts explain how to do things.
That's what they're for. :|

Re: Adding Uber-Mode Tut

Posted: Wed Sep 16, 2009 2:02 pm
by mswf
Par3210 wrote:Thanks for the critizim and nice comments. Starkiller, this isn't spoon fed, all tuts explain how to do things.
That's what they're for. :|
Yes, but those usually explain the not-so-obvious stuff. If any motivated modder would take some time, he could figure that out himself (also, if you browse around you'll find that it has been asked and answered a lot of times). I mean, adding it all up; all that you needed to explain in your tut was: ad this line here, then change the obvious stuff. (I'm really not criticizing you, just relativating Starkiller's comment)

Re: Adding Uber-Mode Tut

Posted: Thu Sep 17, 2009 11:07 am
by IronJaw
I have some experience in mapping and .lua changing and still found the tutorial very helpful. I wrote a tutorial on how to skin on my second day of learning to mod, and I still think it was very helpful, even if there was already several, and everybody knew how to skin. In all reality I couldn't find a decent tutorial on skinning. So after all my research I made one that I thought was more complete/ clear. I think that is what Par3210 did. Not that the world was going to blow up if he didn't make it, but that he thought that having all of the information down in one guide and carefully explaining everything would really benefit new moders. It's not easy being new to forums and moding and having everyone roll there eyes when they ask a simple question like "How do I do Uber-Mode." (I personally was new to both but asking how to skin")