SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Snake on March 20, 2013, 07:32:14 PM

Title: *Discovery* Way around TeamDamage in Singleplayer
Post by: Snake on March 20, 2013, 07:32:14 PM
Well I have been having trouble on the zombie map with everyone killing their teammates while shooting at zombies. I figured out a way around this, just in case someone needs it later.

1. Decide which team will be a "droid" health type and a "person" health type. Let's say Alliance is droid and Empire is person
2. Set Alliance's team's health type as "droid" like so:
[spoiler]
HealthType      = "droid"
MaxHealth       = 250.0[/spoiler]

This is right around the Weapons area.
3. Set the Empire's team's weapons to only affect droids and not the "person" category by changing these lines in all weapon ord files:
[spoiler]
VehicleScale      = "0.0"
ShieldScale      = "1.0"
PersonScale      = "0.0"
DroidScale      = "1.0"
BuildingScale      = "0.1"[/spoiler]

4. Now do the opposite. Change Empire's team health type as person (It already is person)
5. Then set the Alliance's weapons to only affect "person":
[spoiler]
VehicleScale      = "0.0"
ShieldScale      = "1.0"
PersonScale      = "1.0"
DroidScale      = "0.0"
BuildingScale      = "0.1"[/spoiler]

Hope this helps somebody!
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Led on March 20, 2013, 07:43:14 PM
I think you can also make them allies.

Is it AI that kill each other or humans ?
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Snake on March 20, 2013, 09:08:27 PM
Umm.. No, making them allies wouldn't make sense. In single player team damage is on by default so in a map with lots of AI in a small area causes the AI to shoot their own teammates that walk in front of them while they're shooting. They can't kill human teammates even on default, though.
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Phobos on March 21, 2013, 05:50:13 AM
This is a useful trick Fate and I implemented for Jet Wars bosses. The healthtype Droid can deflect missile because we made droidscale 0.0 for damage in the missile odfs   :D

And for me team damage is off by default in single player cuz that's what I set it to in the options.
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: RepComm on March 21, 2013, 09:55:45 AM
I don't know if this is possible, but I know it is in GML;
Could you create a new variable in the ODF, then set it up to be a new type of health? Can you create a new variable and use it for anything at all? Perhaps you could customize more easily if we knew how to do this.

(It is a bit off topic, sorry)
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Are§ on March 21, 2013, 10:38:57 AM
lol wouldn't it just make a lot more sense to turn off your team damage in single player...  :shrug:
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: RepComm on March 21, 2013, 10:42:10 AM
Quote from: Are§ on March 21, 2013, 10:38:57 AM
lol wouldn't it just make a lot more sense to turn off your team damage in single player...  :shrug:
^^, but I still would like to know if you could make new variables, it would be very cool and useful.
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Are§ on March 21, 2013, 10:46:16 AM
yeah i was directing that towards snake.

Oh and are you talking about is it possible to make a new health type? You'd probably have to implement it into every. single. odf... so it would be a huge hassle lol but idk it might be possible
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: RepComm on March 21, 2013, 10:51:59 AM
Quote from: Are§ on March 21, 2013, 10:46:16 AM
Oh and are you talking about is it possible to make a new health type? You'd probably have to implement it into every. single. odf... so it would be a huge hassle lol but idk it might be possible
Lol, huge hassle? I do that sort of thing every day XD...
I'm not sure if you really need it in every odf, just the ones that you need it in, and having new variables for shooting could be used to create new game modes, like 1 in the chamber.
Perhaps something like this:
ChamberAmmo1     = "soldier's_kills_variable#_here"  //At the top of units ODF

WeaponAmmo1      = "ChamberAmmo1"   //Regular weapon ammo found in unit ODF
--- Or
UnitAddHealth         = "-5.0"
UnitHealth  = "5 + soldier's_kills_variable#_here"   (Not sure if the health is just an initial number or an updated number)

Perhaps this should be in the "I have an idea thread" ...
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Sereja on March 21, 2013, 11:02:02 AM
Different health types, and different weapon attraction to it, it's realy very usefull. For example, in my "Santa's Home" map, it's impossible to kill "snowman", by snow ball, or ice :D.
It's also cud be usefull in some "space" or "underwater" maps. In my "Polis Massa" map, in open space, unarmored rebels, dies almost immediately, clones and stormtroopers, got some low damage, droids stay unharmed at all.
It is possible, by editing every unit odf, and change health type to droid, animal, or even vehicle. But in this case, you probably also, need to edit health recharge droids odf, in your map.
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Unit 33 on March 21, 2013, 12:06:33 PM
Could be useful for any "Healing Gun" type weapons, allowing you only heal team members.
(Target specifications aren't really enough)
Title: Re: *Discovery* Way around TeamDamage in Singleplayer
Post by: Snake on March 21, 2013, 04:01:28 PM
Quote from: Are§ on March 21, 2013, 10:38:57 AM
lol wouldn't it just make a lot more sense to turn off your team damage in single player...  :shrug:

Well in the case of my zombie map, TeamDamage is literally the difference between zombies winning and the living winning so I want the only variable to be the person playing instead of their settings.

Quote from: -RepublicCommando- on March 21, 2013, 09:55:45 AM
I don't know if this is possible, but I know it is in GML;
Could you create a new variable in the ODF, then set it up to be a new type of health? Can you create a new variable and use it for anything at all? Perhaps you could customize more easily if we knew how to do this.

(It is a bit off topic, sorry)

hmm, that would be pretty cool but I have never tried it.. I just stick to what's given. That would definitely be worth looking into though.
EhPortal 1.34 © 2024, WebDev