SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: Red04SWBF on October 14, 2018, 06:40:48 AM

Title: (SOLVED) Progressive Health-Decreasing Region
Post by: Red04SWBF on October 14, 2018, 06:40:48 AM
Hi all. Fixing Polis Massa from my Conversion Map Pack I have found that the space outside the hangars around the map doesn't progressively decrease health from the units (this is supposed to happen as in SWBF2, but the problem is that IDK how to do it in SWBF1). I remember that someone said that it was possible to create an Effect Region, but no idea. Does anyone know how or is there a tutorial related?
Title: Re: Progressive Health-Decreasing Region
Post by: Sereja on October 14, 2018, 08:08:18 AM
Making vacuum regions is easy: you need to create .odf like that:
effect_vacuum_a.odf
[GameObjectClass]
GeometryScale = 1.0
ClassLabel      = "powerupstation"
GeometryName        = "effect_vacuum_a.msh"

[Properties]

GeometryName        = "effect_arrow"

PowerupDelay        = "0.3"  //<delay time, default 0.5>
//SoldierHealth       =  "-15.0"  //<health to add, default 0.0>
PersonHealth       =  "-20.0"  //<health to add, default 0.0>
DroidHealth       =  "-20.0"  //<health to add, default 0.0>
AnimalHealth       =  "-20.0"  //<health to add, default 0.0>
VehicleHealth       =  "-120.0"  //<health to add, default 0.0>
Powerupsound        = ""
AmbientSound        = ""
BuiltSound          = ""


[InstanceProperties]
EffectRegion        = ""
Radius          = 5.0


You may change parameters of the damage delay, or which type of infantry may be more damaged here, but "EffectRegion" and "Radius" lines won't ever work via odf.

Also you need to have some two models: one for  being visible in ZE (effect_vacuum_a), other invisible for the game (effect_arrow). Actually they could be any.

Next you need to create region for this .odf like that

Region("Vac1", 0)
{
Position(163.568405, -49.546333, 515.726990);
Rotation(0.999988, 0.000000, -0.006594, 0.000000);
Size(2.350677, 11.767506, 2.287112);
Name("Vac1");
}

And at last save via ZE, the odf in .wld file like that:

Object("effect_vacuum_a3", "effect_vacuum_a", -187734836)
{
ChildRotation(1.000, 0.000, 0.000, 0.000);
ChildPosition(-430.232, -14.295, -14.819);
SeqNo(-187734836);
Team(0);
NetworkId(-1);
EffectRegion("Vac1");
Radius("5.0");
}


Actually you can change the Radius only here, but it needs only if you didn't make a region.

Take a note, that for each new vacuum region you need to create the new .odf.
Title: Re: Progressive Health-Decreasing Region
Post by: Red04SWBF on October 14, 2018, 12:04:44 PM
I just tried it on the Mustafar vents and it worked. Really, thank you very much Sereja! :cheer:

Tbh I had tried something similar before, in fact I had imagined an ODF similar to Health Recharge, but for some reason the map crashed when I tested it (maybe I removed some lines by accident).
EhPortal 1.34 © 2024, WebDev