[SSGM 4.0 Plugin] VeteranSystem ALPHA [message #463595] |
Sun, 04 March 2012 14:35 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
This is a port of the veteran system from the OnOeS renegade regulator made by Hex, jnz and pvtschlag. I rewrote parts of it to resemble the n00bless veteran system plugin for SSGM 2.0.2 released by Hex. It includes regeneration, discounts, health+armour increases and veteran commands. The following commands are available:
!vetpoints - !vp ; Shows how many vet points the player executing the command has
!weapon - !weap ; Will give the player a random weapon from his team, if he is a level 3 veteran
!character - !char ; Will give the player a random character from his team, if he is a level 4 veteran
!vehicle - !veh ; Will give the player a random vehicle from his team, if he is a level 5 veteran
The values associated with every veteran level are currently hard-coded as this is an ALPHA RELEASE. It might crash your server randomly as it isn't tested and it also might contain bugs. I've included the source code, although it looks like a mess.
To install, place VeteranSystem.dll in your root FDS folder and add an entry under the [Plugins] section in SSGM.ini. Then at the bottom of SSGM.ini add:
[VeteranSystem_Tiers]
;If a soldier preset is missing the code defaults the preset to 'low tier', this section controls how many vet point(s) a character is worth
; 1 = low tier, 2 = mid tier, 3 = high tier
CnC_GDI_MiniGunner_0=1 ;Shooter
CnC_GDI_RocketSoldier_0=1 ;Shotgunner
CnC_GDI_Grenadier_0=1 ;Grenadier
CnC_GDI_Engineer_0=1 ;Engineer
CnC_GDI_MiniGunner_1Off=1 ;Officer
CnC_GDI_RocketSoldier_1Off=1 ;Rocket Soldier
CnC_Sydney=1 ;Tib Sydney
CnC_GDI_MiniGunner_2SF=2 ;Deadeye
CnC_GDI_RocketSoldier_2SF=2 ;Gunner
CnC_GDI_Grenadier_2SF=2 ;Patch
CnC_GDI_MiniGunner_3Boss=3 ;Havoc
CnC_GDI_MiniGunner_3Boss_ALT2=3 ;Havoc
CnC_GDI_MiniGunner_3Boss_ALT3=3 ;Havoc
CnC_GDI_MiniGunner_3Boss_ALT4=3 ;Havoc
CnC_Sydney_PowerSuit=3 ;PIC
CnC_Sydney_PowerSuit_ALT2=3 ;PIC
CnC_Ignatio_Mobius=3 ;Mobius
CnC_Ignatio_Mobius_ALT2=3 ;Mobius
CnC_GDI_Engineer_2SF=3 ;Hotwire
CnC_Nod_Minigunner_0=1 ;Shooter
CnC_Nod_RocketSoldier_0=1 ;Shotgunner
CnC_Nod_FlameThrower_0=1 ;Flamethrower
CnC_Nod_Engineer_0=1 ;Engineer
CnC_Nod_Minigunner_1Off=1 ;Officer
CnC_Nod_RocketSoldier_1Off=1 ;Rocket Soldier
CnC_Nod_FlameThrower_1Off=1 ;Chem Sprayer
CnC_Nod_Minigunner_2SF=2 ;Black Hand Sniper
CnC_Nod_RocketSoldier_2SF=2 ;Black Hand Laserchaingunner
CnC_Nod_FlameThrower_2SF=2 ;SBH
CnC_Nod_Minigunner_3Boss=3 ;Sakura
CnC_Nod_Minigunner_3Boss_ALT2=3 ;Sakura
CnC_Nod_RocketSoldier_3Boss=3 ;Raveshaw
CnC_Nod_RocketSoldier_3Boss_ALT2=3 ;Raveshaw
CnC_Nod_FlameThrower_3Boss=3 ;MENdoza
CnC_Nod_FlameThrower_3Boss_ALT2=3 ; MENdoza
CnC_Nod_Technician_0=3 ;Technician
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
|
|
Re: [SSGM 4.0 Plugin] VeteranSystem ALPHA [message #468809 is a reply to message #463595] |
Sat, 09 June 2012 11:33 |
|
ExEric3
Messages: 746 Registered: February 2005 Location: Slovakia
Karma: 0
|
Colonel |
|
|
What is wrong on this code (beta 5):
void VeteranSystem::OnObjectCreate(void *data,GameObject *obj)
{
if (Commands->Is_A_Star(obj) && obj->As_SoldierGameObj() )
{
Attach_Script_Once(obj, "Veteran_Player", "");
Update_Player(Get_Player_ID(obj), obj);
}
else if ( obj->As_VehicleGameObj() )
{
Attach_Script_Once(obj, "Veteran_Vehicle", "");
}
else if (!obj)
{
Attach_Script_Once(obj, "Veteran_C4", "");
}
else if (obj->As_BeaconGameObj() )
{
Attach_Script_Once(obj, "Veteran_Beacon", "");
}
else if (obj->As_BuildingGameObj() )
{
Attach_Script_Once(obj, "Veteran_Building", "");
}
}
I get this error:
21> Veteran.cpp
21>Veteran.cpp(609): error C2039: 'As_BeaconGameObj' : is not a member of 'ScriptableGameObj'
21> c:\ssgm4 beta 5\scripts\ScriptableGameObj.h(50) : see declaration of 'ScriptableGameObj'
21>
21>Build FAILED.
Thanks for help.
|
|
|
|
|
|
Re: [SSGM 4.0 Plugin] VeteranSystem ALPHA [message #468848 is a reply to message #468816] |
Sat, 09 June 2012 14:11 |
|
ExEric3
Messages: 746 Registered: February 2005 Location: Slovakia
Karma: 0
|
Colonel |
|
|
Xpert wrote on Sat, 09 June 2012 20:53 |
iRANian wrote on Sat, 09 June 2012 14:42 | Dunno, try using Is_Beacon() instead.
|
That doesn't exist anymore.
Neither does the following:
Is_C4
Is_Building
Is_Soldier
Is_Vehicle
For Is_Beacon:
if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_BeaconGameObj())
For Is_C4:
else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_C4GameObj())
For Is_Building:
if (obj->As_BuildingGameObj())
For Is_Soldier:
if (obj->As_SoldierGameObj())
For Is_Vehicle:
if (killed->As_VehicleGameObj())
|
So code is:
void VeteranSystem::OnObjectCreate(void *data,GameObject *obj)
{
if (Commands->Is_A_Star(obj) && obj->As_SoldierGameObj() )
{
Attach_Script_Once(obj, "Veteran_Player", "");
Update_Player(Get_Player_ID(obj), obj);
}
else if (obj->As_VehicleGameObj() )
{
Attach_Script_Once(obj, "Veteran_Vehicle", "");
}
[B]else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_C4GameObj() )[/B]
{
Attach_Script_Once(obj, "Veteran_C4", "");
}
[B]else if (obj->As_PhysicalGameObj() && obj->As_PhysicalGameObj()->As_BeaconGameObj() )[/B]
{
Attach_Script_Once(obj, "Veteran_Beacon", "");
}
else if (obj->As_BuildingGameObj() )
{
Attach_Script_Once(obj, "Veteran_Building", "");
}
}
Compile log (bold are bad lines):
21>Veteran.cpp(605): error C2027: use of undefined type 'PhysicalGameObj'
21> c:\ssgm4 beta 5\scripts\engine_ttdef.h(17) : see declaration of 'PhysicalGameObj'
21>Veteran.cpp(605): error C2227: left of '->As_C4GameObj' must point to class/struct/union/generic type
21>Veteran.cpp(609): error C2027: use of undefined type 'PhysicalGameObj'
21> c:\ssgm4 beta 5\scripts\engine_ttdef.h(17) : see declaration of 'PhysicalGameObj'
21>Veteran.cpp(609): error C2227: left of '->As_BeaconGameObj' must point to class/struct/union/generic type
So what you think Xpert? Thx
|
|
|
|
|
Re: [SSGM 4.0 Plugin] VeteranSystem ALPHA [message #468902 is a reply to message #463595] |
Sun, 10 June 2012 01:14 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
Did this to help out Iran...
I know he is busy working on other plugins.
It will now work with beta 5
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
Re: [SSGM 4.0 Plugin] VeteranSystem ALPHA [message #471968 is a reply to message #463595] |
Thu, 19 July 2012 08:17 |
|
Distrbd21
Messages: 743 Registered: September 2008
Karma: 0
|
Colonel |
|
|
Hey I added more Levels under.
But when I play with more then 6 levels enabled it doesn't work.
Am I forgetting to add something somewhere, to make it from 6 to 28?
void Load_Promotion_Info()
{
/* testing some hard-coded stuff */
PromoteInfo* Promote = new PromoteInfo;
Promote->Armor = 0;
Promote->Health = 0;
Promote->Regeneration = 0;
Promote->Discount = 0.0f;
Promote->Points = 0;
Promote->Level = 1;
Promote->Name = "Recruit";
PromotionNames.Add(Promote);
PromoteInfo* Promote2 = new PromoteInfo;
Promote2->Armor = 10;
Promote2->Health = 10;
Promote2->Regeneration = 0.0f;
Promote2->Discount = .10f;
Promote2->Points = 1000;
Promote2->Level = 2;
Promote2->Name = "Private";
PromotionNames.Add(Promote2);
PromoteInfo* Promote3 = new PromoteInfo;
Promote3->Armor = 15;
Promote3->Health = 15;
Promote3->Regeneration = 0.0f;
Promote3->Discount = .15f;
Promote3->Points = 3000;
Promote3->Level = 3;
Promote3->Name = "Private First Class";
PromotionNames.Add(Promote3);
PromoteInfo* Promote4 = new PromoteInfo;
Promote4->Armor = 15;
Promote4->Health = 15;
Promote4->Regeneration = 5.0f;
Promote4->Discount = .20f;
Promote4->Points = 5000;
Promote4->Level = 4;
Promote4->Name = "Lance Corporal";
PromotionNames.Add(Promote4);
PromoteInfo* Promote5 = new PromoteInfo;
Promote5->Armor = 25;
Promote5->Health = 25;
Promote5->Regeneration = 10.0f;
Promote5->Discount = .40f;
Promote5->Points = 7000;
Promote5->Level = 5;
Promote5->Name = "Corporal";
PromotionNames.Add(Promote5);
PromoteInfo* Promote6 = new PromoteInfo;
Promote6->Armor = 30;
Promote6->Health = 30;
Promote6->Regeneration = 15.0f;
Promote6->Discount = .50f;
Promote6->Points = 9000;
Promote6->Level = 6;
Promote6->Name = "Sergeant";
PromotionNames.Add(Promote6);
/*
PromoteInfo* Promote7 = new PromoteInfo;
Promote7->Armor = 0;
Promote7->Health = 0;
Promote7->Regeneration = 0;
Promote7->Discount = 0.0f;
Promote7->Points = 11000;
Promote7->Level = 7;
Promote7->Name = "Staff Sergeant";
PromotionNames.Add(Promote7);
PromoteInfo* Promote8 = new PromoteInfo;
Promote8->Armor = 10;
Promote8->Health = 10;
Promote8->Regeneration = 0.0f;
Promote8->Discount = .10f;
Promote8->Points = 13000;
Promote8->Level = 8;
Promote8->Name = "Gunnery Sergeant";
PromotionNames.Add(Promote8);
PromoteInfo* Promote9 = new PromoteInfo;
Promote9->Armor = 15;
Promote9->Health = 15;
Promote9->Regeneration = 0.0f;
Promote9->Discount = .15f;
Promote9->Points = 15000;
Promote9->Level = 9;
Promote9->Name = "Master Sergeant";
PromotionNames.Add(Promote9);
PromoteInfo* Promote10 = new PromoteInfo;
Promote10->Armor = 15;
Promote10->Health = 15;
Promote10->Regeneration = 5.0f;
Promote10->Discount = .20f;
Promote10->Points = 17000;
Promote10->Level = 10;
Promote10->Name = "First Sergeant";
PromotionNames.Add(Promote10);
PromoteInfo* Promote11 = new PromoteInfo;
Promote11->Armor = 25;
Promote11->Health = 25;
Promote11->Regeneration = 10.0f;
Promote11->Discount = .40f;
Promote11->Points = 19000;
Promote11->Level = 11;
Promote11->Name = "Master Gunnery Sergeant";
PromotionNames.Add(Promote11);
PromoteInfo* Promote12 = new PromoteInfo;
Promote12->Armor = 30;
Promote12->Health = 30;
Promote12->Regeneration = 15.0f;
Promote12->Discount = .50f;
Promote12->Points = 21000;
Promote12->Level = 12;
Promote12->Name = "Sergeant Major";
PromotionNames.Add(Promote12);
PromoteInfo* Promote13 = new PromoteInfo;
Promote13->Armor = 0;
Promote13->Health = 0;
Promote13->Regeneration = 0;
Promote13->Discount = 0.0f;
Promote13->Points = 23000;
Promote13->Level = 13;
Promote13->Name = "Sergeant Major of the Marine ";
PromotionNames.Add(Promote13);
PromoteInfo* Promote14 = new PromoteInfo;
Promote14->Armor = 10;
Promote14->Health = 10;
Promote14->Regeneration = 0.0f;
Promote14->Discount = .10f;
Promote14->Points = 25000;
Promote14->Level = 14;
Promote14->Name = "Warrant Officer";
PromotionNames.Add(Promote14);
PromoteInfo* Promote15 = new PromoteInfo;
Promote15->Armor = 15;
Promote15->Health = 15;
Promote15->Regeneration = 0.0f;
Promote15->Discount = .15f;
Promote15->Points = 27000;
Promote15->Level = 15;
Promote15->Name = "Chief Warrant Officer 2";
PromotionNames.Add(Promote15);
PromoteInfo* Promote16 = new PromoteInfo;
Promote16->Armor = 15;
Promote16->Health = 15;
Promote16->Regeneration = 5.0f;
Promote16->Discount = .20f;
Promote16->Points = 29000;
Promote16->Level = 16;
Promote16->Name = "Chief Warrant Officer 3";
PromotionNames.Add(Promote16);
PromoteInfo* Promote17 = new PromoteInfo;
Promote17->Armor = 25;
Promote17->Health = 25;
Promote17->Regeneration = 10.0f;
Promote17->Discount = .40f;
Promote17->Points = 31000;
Promote17->Level = 17;
Promote17->Name = "Chief Warrant Officer 4";
PromotionNames.Add(Promote17);
PromoteInfo* Promote18 = new PromoteInfo;
Promote18->Armor = 30;
Promote18->Health = 30;
Promote18->Regeneration = 15.0f;
Promote18->Discount = .50f;
Promote18->Points = 33000;
Promote18->Level = 18;
Promote18->Name = "Chief Warrant Officer 5";
PromotionNames.Add(Promote18);
PromoteInfo* Promote19 = new PromoteInfo;
Promote19->Armor = 0;
Promote19->Health = 0;
Promote19->Regeneration = 0;
Promote19->Discount = 0.0f;
Promote19->Points = 35000;
Promote19->Level = 19;
Promote19->Name = "Second Lieutenant";
PromotionNames.Add(Promote19);
PromoteInfo* Promote20 = new PromoteInfo;
Promote20->Armor = 10;
Promote20->Health = 10;
Promote20->Regeneration = 0.0f;
Promote20->Discount = .10f;
Promote20->Points = 37000;
Promote20->Level = 20;
Promote20->Name = "First Lieutenant";
PromotionNames.Add(Promote20);
PromoteInfo* Promote21 = new PromoteInfo;
Promote21->Armor = 15;
Promote21->Health = 15;
Promote21->Regeneration = 0.0f;
Promote21->Discount = .15f;
Promote21->Points = 39000;
Promote21->Level = 21;
Promote21->Name = "Captain";
PromotionNames.Add(Promote21);
PromoteInfo* Promote22 = new PromoteInfo;
Promote22->Armor = 15;
Promote22->Health = 15;
Promote22->Regeneration = 5.0f;
Promote22->Discount = .20f;
Promote22->Points = 41000;
Promote22->Level = 22;
Promote22->Name = "Major";
PromotionNames.Add(Promote22);
PromoteInfo* Promote23 = new PromoteInfo;
Promote23->Armor = 25;
Promote23->Health = 25;
Promote23->Regeneration = 10.0f;
Promote23->Discount = .40f;
Promote23->Points = 43000;
Promote23->Level = 23;
Promote23->Name = "Lieutenant Colonel";
PromotionNames.Add(Promote23);
PromoteInfo* Promote24 = new PromoteInfo;
Promote24->Armor = 30;
Promote24->Health = 30;
Promote24->Regeneration = 15.0f;
Promote24->Discount = .50f;
Promote24->Points = 45000;
Promote24->Level = 24;
Promote24->Name = "Colonel";
PromotionNames.Add(Promote24);
PromoteInfo* Promote25 = new PromoteInfo;
Promote25->Armor = 25;
Promote25->Health = 25;
Promote25->Regeneration = 10.0f;
Promote25->Discount = .40f;
Promote25->Points = 47000;
Promote25->Level = 25;
Promote25->Name = "Brigadier General";
PromotionNames.Add(Promote25);
PromoteInfo* Promote26 = new PromoteInfo;
Promote26->Armor = 30;
Promote26->Health = 30;
Promote26->Regeneration = 15.0f;
Promote26->Discount = .50f;
Promote26->Points = 49000;
Promote26->Level = 26;
Promote26->Name = "Major General";
PromotionNames.Add(Promote26);
PromoteInfo* Promote27 = new PromoteInfo;
Promote27->Armor = 0;
Promote27->Health = 0;
Promote27->Regeneration = 0;
Promote27->Discount = 0.0f;
Promote27->Points = 51000;
Promote27->Level = 27;
Promote27->Name = "Lieutenant General";
PromotionNames.Add(Promote27);
PromoteInfo* Promote28 = new PromoteInfo;
Promote28->Armor = 10;
Promote28->Health = 10;
Promote28->Regeneration = 0.0f;
Promote28->Discount = .10f;
Promote28->Points = 53000;
Promote28->Level = 28;
Promote28->Name = "General";
PromotionNames.Add(Promote28);
*/
// const PromoteInfo* test = Get_Promotion_Info(1); // DEBUG CRAP
// const PromoteInfo* test2 = Get_Promotion_Info(2); // DEBUG CRAP
}
Still working on it so I know somethings are the same in each level, but the Level = and Name =.
Live Your Life Not Some one Else's.| Sharing Is Caring
Cookie Jar<glome> Who stole the cookie from the cookie jar?!
<content> glome stole the cookie from the cookie jar!
<glome> Who me?!
<content> Yes you!
<glome> Couldn't be!
<content> Then WHO?!!
<glome> Woody stole the cookie from the cookie jar!
*** glome has been kicked by DrWoody (fuck you i didn't touch the motherfucking cookie, bitch
Suicide<TB> I was depressed last night so I called the Suicide Life Line.
<TB> I reached a call center in Pakistan.
<TB> I told them I was suicidal.
<TB> They got all excited and asked if I could drive a truck
|
|
|
|
|
|