Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [Plug-in] SSGM2.02 Commander BETA  () 1 Vote
Re: [Plug-in] SSGM2.02 Commander BETA [message #397616 is a reply to message #383047] Tue, 11 August 2009 14:30 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
In Love Sounds great Smile i am not a scripter, but can i add a tank drop also?
Re: [Plug-in] SSGM2.02 Commander BETA [message #397663 is a reply to message #383047] Tue, 11 August 2009 22:33 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
You could quite easily adapt it to drop a tank, yeah.


Re: [Plug-in] SSGM2.02 Commander BETA [message #397665 is a reply to message #383047] Tue, 11 August 2009 23:08 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
ok, i wich files should i change?
Re: [Plug-in] SSGM2.02 Commander BETA [message #397676 is a reply to message #383383] Wed, 12 August 2009 00:34 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
If you have limited coding experiance, I would suggest you just change the cinematic files called Nod_Supply.txt and GDI_Supply.txt.
I would remove the part that attaches the "reb_supply_crate" script, and instead make it drop off a tank.

If you are feeling braver, then search through Commander.ccp in the source that's part of the download, and then amend the chat hook that calls this function, and the other scripts that are used in the chat hook.



Re: [Plug-in] SSGM2.02 Commander BETA [message #397683 is a reply to message #383047] Wed, 12 August 2009 03:01 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
I think I made it Big Grin I wonder one thing, how do I decide how much it costs ?
Re: [Plug-in] SSGM2.02 Commander BETA [message #397684 is a reply to message #383047] Wed, 12 August 2009 03:03 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
Is this correct?
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
GameObject *object = Get_GameObj(ID);
if(GDICommander[ID] || NodCommander[ID]){
	if(GDICommander[ID]){
		if(GDIDropActive){
		if(GDITeamFund >= CSettings->supplycost){
			GDITeamFund = GDITeamFund - CSettings->supplycost;
//Create the supply drop here
Commands->Create_2D_WAV_Sound("m00evag_dsgn0063i1evag_snd.wav");
Vector3 position = Commands->Get_Position(object);
GameObject *flare = Commands->Create_Object("Invisible_Object",position);
Commands->Set_Model(flare,"ag_sigflare_gld");
Commands->Attach_Script(flare,"Test_Cinematic","GDI_MedDrop.txt");
			GDIDropActive = false;
GameObject *dropsetter = Commands->Create_Object("Invisible_Object",Vector3(0.0f,0.0f,0.0f));
Commands->Attach_Script(dropsetter,"reb_GDI_drop_setter","");
		}
		else{
Console_Input(StrFormat("ppage %d you do not have enough money in the Team Fund to order a tank drop.",ID).c_str());
		}
}
		else{
Console_Input(StrFormat("ppage %d The \"!meddrop\" command is not available yet. It can be used every %i seconds",ID,CSettings->droptimer).c_str());
		}
	}
	else if(NodCommander[ID]){
if(NodDropActive){
		if(NodTeamFund >= CSettings->supplycost){
			NodTeamFund = NodTeamFund - CSettings->supplycost;
//Create the supply drop here
			//mx0_trooper1_112.wav
			Commands->Create_2D_WAV_Sound("m00evag_dsgn0063i1evag_snd.wav");
Vector3 position = Commands->Get_Position(object);
GameObject *flare = Commands->Create_Object("Invisible_Object",position);
Commands->Set_Model(flare,"ag_sigflare_gld");
Commands->Attach_Script(flare,"Test_Cinematic","Nod_LightDrop.txt");


			NodDropActive = false;
GameObject *dropsetter = Commands->Create_Object("Invisible_Object",Vector3(0.0f,0.0f,0.0f));
Commands->Attach_Script(dropsetter,"reb_Nod_drop_setter","");
		}
		else{
Console_Input(StrFormat("ppage %d you do not have enough money in the Team Fund to order a tank drop.",ID).c_str());
		}
}
		else{
Console_Input(StrFormat("ppage %d The \"!lightdrop\" command is not available yet. It can be used every %i seconds",ID,CSettings->droptimer).c_str());
		}
	}
}
else{
Console_Input(StrFormat("ppage %d You are not a team commander and cannot use this command.",ID).c_str());
}


}
};
ChatCommandRegistrant<TankChatCommand> TankChatCommandReg("!meddrop;!mediumtank;!medtank;!mediumtankdrop;!lightdrop;lighttank;!lighttankdrop;!light;!med",CHATTYPE_ALL,0,GAMEMODE_ALL);
Re: [Plug-in] SSGM2.02 Commander BETA [message #397688 is a reply to message #383047] Wed, 12 August 2009 04:46 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
You could hard code the cost of the drop if you wanted to do that in there yes.
Specifically here:
if(GDITeamFund >= CSettings->supplycost){
			GDITeamFund = GDITeamFund - CSettings->supplycost;


You would change it to this for example if you wanted it to cost 2000 credits:

if(GDITeamFund >= 2000){
			GDITeamFund = GDITeamFund - 2000;


However, the cost of the drop has been set up to be a configurable option in the .ini file supplied in the download.

You seem to be getting the hang of this, for someone who claims to not be able to code, you've done well! Smile
You do realise you need to compile this code, don't you?



[Updated on: Wed, 12 August 2009 04:46]

Report message to a moderator

Re: [Plug-in] SSGM2.02 Commander BETA [message #397689 is a reply to message #383047] Wed, 12 August 2009 05:04 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
It isnt to hard actually Smile I took a look at ur code, and understood it ^^
Re: [Plug-in] SSGM2.02 Commander BETA [message #397690 is a reply to message #383047] Wed, 12 August 2009 05:11 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
So I should put the files i have modified into commander.dll with Visual C++ or?
Re: [Plug-in] SSGM2.02 Commander BETA [message #397693 is a reply to message #383047] Wed, 12 August 2009 05:45 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
I guess you opened them in notepad or something?

Basically, what you should be doing is opening the solution file (.sln). This file opens with visualstdio.net2005 (which you need to install).
You can find out how to install a free version here: http://www.renegadeforums.com/index.php?t=msg&th=26642&start=0&rid=3 415

Using visual studio, you can browse the relevant .ccp and .h files allot easier. Once you have made your changes and you are happy with them (you seem to do done this already), you can compile the source code (hit f5). This will then produce the compiled .dll file in the working folder of the source code.



Re: [Plug-in] SSGM2.02 Commander BETA [message #397698 is a reply to message #383047] Wed, 12 August 2009 06:05 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
Does it work with the 2008 version of Visual C++?
Re: [Plug-in] SSGM2.02 Commander BETA [message #397700 is a reply to message #383047] Wed, 12 August 2009 06:19 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Probably, but not without some adjustments. I have never actually tried.

Your questions, whilst welcome, are probably becoming irrelevant to the topic at hand now, you may wish to start your own modding topic if you need more help. You're starting to go at a tangent now...



Re: [Plug-in] SSGM2.02 Commander BETA [message #397703 is a reply to message #383047] Wed, 12 August 2009 06:32 Go to previous messageGo to next message
Vaati19 is currently offline  Vaati19
Messages: 50
Registered: April 2009
Location: Sweden
Karma: 0
Recruit
ok Smile I got my questions cleared up. And I found a version of Visual C++ 2005 ^^
Re: [Plug-in] SSGM2.02 Commander BETA [message #399899 is a reply to message #383047] Wed, 26 August 2009 13:43 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Version 1.3 is now available, which should address the crash bug.
I was using a function that someone else wrote, the function assumed that all base game objects where actually scriptable game objects, but they are not. This fix came about from a problem on the APB server, and I ported the fix quickly to this plug-in too. So it isn't tested, but I can say with a fair degree of certainty that this should fix the problem.
Many thanks to Ghostshaw for providing some insight into this annoying problem.

http://spencerelliott.co.uk/downloads.html



Re: [Plug-in] SSGM2.02 Commander BETA [message #399985 is a reply to message #383047] Wed, 26 August 2009 22:36 Go to previous messageGo to next message
infusi0n
Messages: 53
Registered: October 2008
Location: New York
Karma: 0
Recruit
only v1.2 is showing on that site?
Re: [Plug-in] SSGM2.02 Commander BETA [message #399989 is a reply to message #383047] Wed, 26 August 2009 22:39 Go to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
First version was 1.0 (third one down), second version was 1.1, last version to be released, the current version is 1.2.


[Updated on: Wed, 26 August 2009 22:40]

Report message to a moderator

Previous Topic: Hot Snow [3rd Havoc Mode]
Next Topic: [SKIN] C&C 3 Medium Tank
Goto Forum:
  


Current Time: Fri Nov 29 19:16:01 MST 2024

Total time taken to generate the page: 0.01424 seconds