Home » Renegade Discussions » Mod Forum » Help with SSAOW mult. weap. char.
Help with SSAOW mult. weap. char. [message #297447] |
Sun, 18 November 2007 13:48 |
|
Fleetatks
Messages: 58 Registered: April 2005
Karma: 0
|
Recruit |
|
|
I need help giving a character Multiple weapons (such as Ramjet, Volt Rifle, Rail gun, ect..) Inside of Level Edit. I know you can use the "M00_Grant_Upgrade_Created" Script, but it doesn't work for anything other then Pistol and TimedC4 for me. I currently am using SSAOW V 1.4.1, Trying to edit character Mutant_3Boss_Petrova, I have her Primary as Weapon_VoltAutoRifle_Player_Nod (edditted with unlim. ammo) and her secondary as CnC_Weapon_RepairGun_Player_Special. So if anyone knows how to give a character more weapons, please let me know.
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #297505 is a reply to message #297447] |
Sun, 18 November 2007 16:59 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
M00_Grant_Powerup_Created should work fine. Keep in mind that it takes a powerup preset, NOT a weapon preset. You should also upgrade to SSGM 2.0.2, SSAOW 1.4.1 is very outdated.
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #297535 is a reply to message #297505] |
Sun, 18 November 2007 19:22 |
|
Fleetatks
Messages: 58 Registered: April 2005
Karma: 0
|
Recruit |
|
|
Whitedragon wrote on Sun, 18 November 2007 18:59 | M00_Grant_Powerup_Created should work fine. Keep in mind that it takes a powerup preset, NOT a weapon preset. You should also upgrade to SSGM 2.0.2, SSAOW 1.4.1 is very outdated.
|
It SHOULD work, yes, but it doesn't. I'm thinking it has something to do with what you pick as the primary and secondary weapons because a tutorial at renehelp said f you have the repair gun first, you won't get the pistol and C4. Is there another script that works like M00_Grant_Powerup_Created, but will actually work for any weapon (Yes I know I should be using the power up preset, not the weapon preset)?
I also have a couple other questions:
Can u add (not temp) presets and save it to objects.ddb (then change to .aow,) because temp files are used for making .mix files apparently, but I'm not sure what it would do to the .aow i use in SSAOW.
Will upgrading the SSAOW version actually have any changes in it that will be worth me having to start all over again? (unless I can somehow just update the file by adding to it, rather then replace it.)
And finally, I would like to learn how to get functions such as !buy <Character> to work, if someone could show me an example I could probably figure the rest out on my own..
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298178 is a reply to message #297535] |
Wed, 21 November 2007 21:55 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Fleetatks wrote on Sun, 18 November 2007 21:22 |
Whitedragon wrote on Sun, 18 November 2007 18:59 | M00_Grant_Powerup_Created should work fine. Keep in mind that it takes a powerup preset, NOT a weapon preset. You should also upgrade to SSGM 2.0.2, SSAOW 1.4.1 is very outdated.
|
It SHOULD work, yes, but it doesn't. I'm thinking it has something to do with what you pick as the primary and secondary weapons because a tutorial at renehelp said f you have the repair gun first, you won't get the pistol and C4. Is there another script that works like M00_Grant_Powerup_Created, but will actually work for any weapon (Yes I know I should be using the power up preset, not the weapon preset)?
I also have a couple other questions:
Can u add (not temp) presets and save it to objects.ddb (then change to .aow,) because temp files are used for making .mix files apparently, but I'm not sure what it would do to the .aow i use in SSAOW.
Will upgrading the SSAOW version actually have any changes in it that will be worth me having to start all over again? (unless I can somehow just update the file by adding to it, rather then replace it.)
And finally, I would like to learn how to get functions such as !buy <Character> to work, if someone could show me an example I could probably figure the rest out on my own..
|
M00_Grant_Powerup_Created does work. You simply attach it to the preset again and type the POW name in the weapondef input parameter.
I don't know of another script that grants a powerup, but here is a simple one made for solely that purpose. You would have to copy this into the ssaow source code and compile it, then attach the script to the presets in level edit defining the POW you wanted to grant in the "PowerUp" input parameter.
void fleetatks_weapon_grant::Created(GameObject *obj){
const char *weapontogrant = Get_Parameter("PowerUp");
Commands->Give_Powerup(obj,weapontogrant,false);
}
registrant
ScriptRegistrant<fleetatks_weapon_grant> fleetatks_weapon_grant_Registrant("fleetatks_weapon_grant","PowerUp:string");
definition (for the .h file)
class fleetatks_weapon_grant : public ScriptImpClass {
void Created(GameObject *obj);
};
The buy commands are horrid in my opinion, but they are done with chat hooks. Most people use the LUA plug-in and write the code in LUA, but I have no experiance of this language so I will show you how to do it in C++, which will have more functionality then the LUA plug-in anyway, as you are woring directly with the API.
class mutantChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Change_Character(obj,"CnC_Nod_Mutant_0_Mutant");
}
};
ChatCommandRegistrant<mutantChatCommand> mutantChatCommandReg("!mutant",CHATTYPE_TEAM,0,GAMEMODE_ALL);
The preceeding code will be triggered when a player types "!mutant", they will be turned into a mutant character preset from level edit.
However that on its own is a bit crappy, you have no idea what team the player is so typing this may actually change there character to something that isn't supposed to be purchasable on there team.
class mutantChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
float money = Commands->Get_Money(purchaser);
int team = Commands->Get_Player_Type(obj);
Vector3 position = Commands->Get_Position(obj);
if (money >= 150 && team == 0){
Commands->Give_Money(obj,-150,false);
Change_Character(obj,"M09_Spawning_Mutant");
Commands->Set_Position(obj,position);
}
else {
Console_Input(StrFormat("ppage %d You do not meet the requirements to buy a mutant",ID).c_str());
}
}
};
ChatCommandRegistrant<mutantChatCommand> mutantChatCommandReg("!mutant",CHATTYPE_TEAM,0,GAMEMODE_ALL);
The preceeding code checks the players current money, and makes sure they are on team 0 (which is Nod) and allows them to buy the mutant if they have 150 credits or more. It will take 150 credits away from them if they do have the money and grant them the mutant. It will also put them back at the same position they was when they typed the command so it will look more like a change of state.
Buying vehichles is similar, only you would use:
GameObject *vehichle = Commands->Create_Object("vehichle preset name in here",position);
However position in this instance is the exact position of the player. so you would want to do something like:
position.X += 2.0f;
position.Z += 2.0f;
after declaring and defining the position. This will make the vehichle get created a little bit above you position and to the side of you. You may need to change those values as I havnt checked they are suitable enough to be far away not for you to get stuck in the vehichle.
If you want to check if the weapons factory is alive or the airstrip before allowing them to buy a vehcihle then you would use this:
"if(Find_Airstrip(0))" and "if(Find_War_Factory(1))", which will return null or 1, this will allow you to not create the object of the weapons fact/strip is dead.
I based all of this on ssgm, so there may be differences in ssaow.
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298206 is a reply to message #298178] |
Thu, 22 November 2007 05:17 |
|
Scrin
Messages: 1310 Registered: January 2007 Location: Cold City
Karma: 0
|
General (1 Star) |
|
|
reborn wrote on Wed, 21 November 2007 22:55 |
Fleetatks wrote on Sun, 18 November 2007 21:22 |
Whitedragon wrote on Sun, 18 November 2007 18:59 | M00_Grant_Powerup_Created should work fine. Keep in mind that it takes a powerup preset, NOT a weapon preset. You should also upgrade to SSGM 2.0.2, SSAOW 1.4.1 is very outdated.
|
It SHOULD work, yes, but it doesn't. I'm thinking it has something to do with what you pick as the primary and secondary weapons because a tutorial at renehelp said f you have the repair gun first, you won't get the pistol and C4. Is there another script that works like M00_Grant_Powerup_Created, but will actually work for any weapon (Yes I know I should be using the power up preset, not the weapon preset)?
I also have a couple other questions:
Can u add (not temp) presets and save it to objects.ddb (then change to .aow,) because temp files are used for making .mix files apparently, but I'm not sure what it would do to the .aow i use in SSAOW.
Will upgrading the SSAOW version actually have any changes in it that will be worth me having to start all over again? (unless I can somehow just update the file by adding to it, rather then replace it.)
And finally, I would like to learn how to get functions such as !buy <Character> to work, if someone could show me an example I could probably figure the rest out on my own..
|
M00_Grant_Powerup_Created does work. You simply attach it to the preset again and type the POW name in the weapondef input parameter.
I don't know of another script that grants a powerup, but here is a simple one made for solely that purpose. You would have to copy this into the ssaow source code and compile it, then attach the script to the presets in level edit defining the POW you wanted to grant in the "PowerUp" input parameter.
void fleetatks_weapon_grant::Created(GameObject *obj){
const char *weapontogrant = Get_Parameter("PowerUp");
Commands->Give_Powerup(obj,weapontogrant,false);
}
registrant
ScriptRegistrant<fleetatks_weapon_grant> fleetatks_weapon_grant_Registrant("fleetatks_weapon_grant","PowerUp:string");
definition (for the .h file)
class fleetatks_weapon_grant : public ScriptImpClass {
void Created(GameObject *obj);
};
The buy commands are horrid in my opinion, but they are done with chat hooks. Most people use the LUA plug-in and write the code in LUA, but I have no experiance of this language so I will show you how to do it in C++, which will have more functionality then the LUA plug-in anyway, as you are woring directly with the API.
class mutantChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
Change_Character(obj,"CnC_Nod_Mutant_0_Mutant");
}
};
ChatCommandRegistrant<mutantChatCommand> mutantChatCommandReg("!mutant",CHATTYPE_TEAM,0,GAMEMODE_ALL);
The preceeding code will be triggered when a player types "!mutant", they will be turned into a mutant character preset from level edit.
However that on its own is a bit crappy, you have no idea what team the player is so typing this may actually change there character to something that isn't supposed to be purchasable on there team.
class mutantChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
float money = Commands->Get_Money(purchaser);
int team = Commands->Get_Player_Type(obj);
Vector3 position = Commands->Get_Position(obj);
if (money >= 150 && team == 0){
Commands->Give_Money(obj,-150,false);
Change_Character(obj,"M09_Spawning_Mutant");
Commands->Set_Position(obj,position);
}
else {
Console_Input(StrFormat("ppage %d You do not meet the requirements to buy a mutant",ID).c_str());
}
}
};
ChatCommandRegistrant<mutantChatCommand> mutantChatCommandReg("!mutant",CHATTYPE_TEAM,0,GAMEMODE_ALL);
The preceeding code checks the players current money, and makes sure they are on team 0 (which is Nod) and allows them to buy the mutant if they have 150 credits or more. It will take 150 credits away from them if they do have the money and grant them the mutant. It will also put them back at the same position they was when they typed the command so it will look more like a change of state.
Buying vehichles is similar, only you would use:
GameObject *vehichle = Commands->Create_Object("vehichle preset name in here",position);
However position in this instance is the exact position of the player. so you would want to do something like:
position.X += 2.0f;
position.Z += 2.0f;
after declaring and defining the position. This will make the vehichle get created a little bit above you position and to the side of you. You may need to change those values as I havnt checked they are suitable enough to be far away not for you to get stuck in the vehichle.
If you want to check if the weapons factory is alive or the airstrip before allowing them to buy a vehcihle then you would use this:
"if(Find_Airstrip(0))" and "if(Find_War_Factory(1))", which will return null or 1, this will allow you to not create the object of the weapons fact/strip is dead.
I based all of this on ssgm, so there may be differences in ssaow.
|
.....
your not a full asshole, i must say
In Memmory of Patriarch Alexy II of Russia (23.02.1929--05.12.2008)
In Memory of First President of Russia (01.02.1931--23.04.2007)
Scrin's C&C Tiberian Sun Universe
YouTube Channel (C&C Renegade Stuff)
|
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298213 is a reply to message #297447] |
Thu, 22 November 2007 06:42 |
|
sadukar09
Messages: 2812 Registered: May 2007 Location: Ottawa,Canada
Karma: 0
|
General (2 Stars) |
|
|
+1 Respect point, until some Modding expert tests it. Then it's +5. But you are still at -6.
Quote: | [19:16:48] <APBBR> @ryan3k: THE ENFIELD DEFIES THE LAWS OF PHYSICS BECAUSE THE BULLETS INSTANTLY HIT THEIR TARGETS LOL
[19:16:52] <APBBR> @ryan3k: CHRONO TECHNOLOGY IN TEH BULLETS
|
Quote: | [22:48]<APBBR> @V0LK0V: AOL COMING UR WAI K
[22:48] <APBBR> Host: Quitting due to Westwood Online connection loss.
|
|
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298248 is a reply to message #298230] |
Thu, 22 November 2007 09:44 |
|
sadukar09
Messages: 2812 Registered: May 2007 Location: Ottawa,Canada
Karma: 0
|
General (2 Stars) |
|
|
Ghostshaw wrote on Thu, 22 November 2007 09:29 | Its fake. The hud.ini file just contains the line "what do you expect"
-Ghost-
|
Haha. Thought so.
Quote: | [19:16:48] <APBBR> @ryan3k: THE ENFIELD DEFIES THE LAWS OF PHYSICS BECAUSE THE BULLETS INSTANTLY HIT THEIR TARGETS LOL
[19:16:52] <APBBR> @ryan3k: CHRONO TECHNOLOGY IN TEH BULLETS
|
Quote: | [22:48]<APBBR> @V0LK0V: AOL COMING UR WAI K
[22:48] <APBBR> Host: Quitting due to Westwood Online connection loss.
|
|
|
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298415 is a reply to message #298402] |
Thu, 22 November 2007 21:46 |
Sn1per74*
Messages: 939 Registered: April 2006
Karma: 0
|
Colonel |
|
|
reborn wrote on Thu, 22 November 2007 21:22 | Using the SSGM source code will require you to use VisualStudio.NET 2005, there is a thread made by Jon_Wil here: http://www.renegadeforums.com/index.php?t=msg&th=26642&start=0&rid=3 415
That shows you how to set up the environment for free using the express edition.
However I recomend getting the full version, it's just easier.
|
Before you get the full version though I'd test out the free one to see if you will stick with it. You don't want to pay money for something you won't use. Unless you get it somewhere else? I'll leave that to YOU.
Creator: AoBFrost
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298564 is a reply to message #298178] |
Fri, 23 November 2007 19:28 |
|
Fleetatks
Messages: 58 Registered: April 2005
Karma: 0
|
Recruit |
|
|
reborn wrote on Wed, 21 November 2007 23:55 |
..........
The buy commands are horrid in my opinion, but they are done with chat hooks. Most people use the LUA plug-in and write the code in LUA, but I have no experiance of this language so I will show you how to do it in C++, which will have more functionality then the LUA plug-in anyway, as you are woring directly with the API.
..........
class mutantChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *obj = Get_GameObj(ID);
float money = Commands->Get_Money(purchaser);
int team = Commands->Get_Player_Type(obj);
Vector3 position = Commands->Get_Position(obj);
if (money >= 150 && team == 0){
Commands->Give_Money(obj,-150,false);
Change_Character(obj,"M09_Spawning_Mutant");
Commands->Set_Position(obj,position);
}
else {
Console_Input(StrFormat("ppage %d You do not meet the requirements to buy a mutant",ID).c_str());
}
}
};
ChatCommandRegistrant<mutantChatCommand> mutantChatCommandReg("!mutant",CHATTYPE_TEAM,0,GAMEMODE_ALL);
The preceeding code checks the players current money, and makes sure they are on team 0 (which is Nod) and allows them to buy the mutant if they have 150 credits or more. It will take 150 credits away from them if they do have the money and grant them the mutant. It will also put them back at the same position they was when they typed the command so it will look more like a change of state.
..........
|
For this part I need to know: What do I add the code to? And where? I've tried figuring it out on my own but it seems a little bit more complicated then I thought it would be. I extracted the folder and am able to see all the different coding files. I'm able to add to, and create new code files, but I'm not sure where to put the code. I also need help on what I do after I inserted the code, I'm not sure what compile means but I'm assuming is similar to saving/exporting. What file(s) do I add to where? In other words, is there going to be a new .dll file to add to my FDS, or does something go onto my IRC bot? (I use cloudy server)
|
|
|
Re: Help with SSAOW mult. weap. char. [message #298606 is a reply to message #297447] |
Fri, 23 November 2007 23:42 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma: 0
|
General (3 Stars) |
|
|
Double click the file called "SSGM.sln" in the folder. This will open up the development environment. In your solution explorer you need to open up a file called "gamain.cpp".
I would place the code with all the other chat hooks (they can be found near the bottom of the file).
To link and compile the code (which will produce a new .dll file in your folder for you to use on your server) just hit f7, or go to build->build solution.
|
|
|
|
Goto Forum:
Current Time: Wed Nov 27 00:48:24 MST 2024
Total time taken to generate the page: 0.01555 seconds
|