View unanswered posts | View active topics It is currently Fri Dec 27, 2024 12:12 pm



Reply to topic  [ 15 posts ] 
 Very small request for One Man Army Mode 
Author Message
User avatar

Joined: Tue Dec 21, 2010 7:11 pm
Posts: 5
Reply with quote
Post Very small request for One Man Army Mode
I was wondering if anybody could make it so that you start with a heavy sniper rifle instead of an assault rifle.
If you could, that would be lovely.


Sun Dec 26, 2010 6:13 am
Profile
User avatar

Joined: Tue Apr 07, 2009 8:24 am
Posts: 193
Location: Australia
Reply with quote
Post Re: Very small request for One Man Army Mode
Extract the .rar file i attached into base.rte/scenes/scripts.


Attachments:
One Man Army.rar [2.42 KiB]
Downloaded 179 times
Sun Dec 26, 2010 7:27 am
Profile
User avatar

Joined: Thu Dec 16, 2010 11:06 pm
Posts: 276
Reply with quote
Post Re: Very small request for One Man Army Mode
For the future, you can simply edit One Man Army.lua in Base.rte/Scenes/Scripts and modify the values at line 19. The format is
Code:
foundBrain:AddInventoryItem(CreateBlank1("Blank2/Blank3"));

with Blank1 being the type of item (HDFirearm, etc), Blank2 being the faction name (Coalition, etc), and Blank3 being the weapon name (Heavy Sniper Rifle, etc).


Mon Dec 27, 2010 1:27 am
Profile
User avatar

Joined: Tue Dec 21, 2010 7:11 pm
Posts: 5
Reply with quote
Post Re: Very small request for One Man Army Mode
Thanks, mates.
Now I know!


Mon Dec 27, 2010 1:29 am
Profile
User avatar

Joined: Wed Apr 30, 2008 10:10 am
Posts: 214
Location: Seattle, WA
Reply with quote
Post Re: Very small request for One Man Army Mode
how would one change the actor type? i can figure everything else out, but if i want to make it a crobo (for instance) then what needs to be done there?


Mon Dec 27, 2010 11:06 pm
Profile WWW
User avatar

Joined: Sun Jun 21, 2009 11:57 pm
Posts: 32
Reply with quote
Post Re: Very small request for One Man Army Mode
It's right there at the start of the One Man Army lua

Quote:
if not foundBrain then
foundBrain = CreateAHuman("Soldier Heavy");
foundBrain:AddInventoryItem(CreateHDFirearm("Coalition/Assault Rifle"));
foundBrain:AddInventoryItem(CreateHDFirearm("Coalition/Auto Pistol"));
foundBrain:AddInventoryItem(CreateTDExplosive("Coalition/Grenade"));


That's the ♥♥♥♥ you need to edit. Nearly 100% sure but I could be wrong.


Mon Dec 27, 2010 11:13 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Very small request for One Man Army Mode
That sounds like it from here. I might use the skirmish code to make it random on Nuts! difficulty.


Mon Dec 27, 2010 11:32 pm
Profile
User avatar

Joined: Sat Feb 20, 2010 1:37 am
Posts: 8
Reply with quote
Post Re: Very small request for One Man Army Mode
Code:
if not foundBrain then
         foundBrain = CreateAHuman("Robot");
         foundBrain:AddInventoryItem(CreateHDFirearm("SovietPistol"));
         foundBrain:AddInventoryItem(CreateHDFirearm("Coalition/Auto Pistol"));
         foundBrain:AddInventoryItem(CreateTDExplosive("Coalition/Grenade"));
         foundBrain.Pos = SceneMan:MovePointToGround(Vector(math.random(0, SceneMan.SceneWidth), 0), 0, 0)


Can someone swap this for the normal equivalent in the One Man Army .LUA file for me? All I have is Notepad, so I can't save in .LUA format, and I don't have any room on my comp to add a proper program for such.


Wed Dec 29, 2010 2:37 am
Profile
User avatar

Joined: Sat Feb 20, 2010 1:37 am
Posts: 8
Reply with quote
Post Re: Very small request for One Man Army Mode
Price isn't the issue- space on my computer to INSTALL the program is. Also, thanks for the info.


Wed Dec 29, 2010 2:45 am
Profile
User avatar

Joined: Sun Jun 21, 2009 11:57 pm
Posts: 32
Reply with quote
Post Re: Very small request for One Man Army Mode
DarkFire wrote:
Code:
if not foundBrain then
         foundBrain = CreateAHuman("Robot");
         foundBrain:AddInventoryItem(CreateHDFirearm("SovietPistol"));
         foundBrain:AddInventoryItem(CreateHDFirearm("Coalition/Auto Pistol"));
         foundBrain:AddInventoryItem(CreateTDExplosive("Coalition/Grenade"));
         foundBrain.Pos = SceneMan:MovePointToGround(Vector(math.random(0, SceneMan.SceneWidth), 0), 0, 0)


Can someone swap this for the normal equivalent in the One Man Army .LUA file for me? All I have is Notepad, so I can't save in .LUA format, and I don't have any room on my comp to add a proper program for such.


When you're saving it go to - Save As... - Save As Type : All Files (*.*) and then save it as "WhateverYourScriptIs.lua" and it'll save as a lua file.


Wed Dec 29, 2010 2:46 am
Profile
User avatar

Joined: Sat Feb 20, 2010 1:37 am
Posts: 8
Reply with quote
Post Re: Very small request for One Man Army Mode
I figured that out after Nonsequitorian posted, but thanks Zait.





EDIT: Now the game is trying to tell me that an unexpected character near ")" in line 22 is causing an error. I didn't change anything other than HeavySoldier to Robot and SMG to SovietPistol. Nothing but those two things have changed, and the game is freaking out that I added an unexpected character. What do I do?


Wed Dec 29, 2010 2:54 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Very small request for One Man Army Mode
Are you sure you didn't accidentally erase a quotation mark?


Wed Dec 29, 2010 3:33 am
Profile
User avatar

Joined: Sat Feb 20, 2010 1:37 am
Posts: 8
Reply with quote
Post Re: Very small request for One Man Army Mode
Absolutely sure. I even restored it to the original version, same thing.


Wed Dec 29, 2010 3:57 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Very small request for One Man Army Mode
"Grenade","Coalition.rte" is what should be used.
The rte argument is incase of name collisions(such as MP3 and BW both having the same name for their dispenser lights)


Wed Dec 29, 2010 4:38 am
Profile
User avatar

Joined: Sat Feb 20, 2010 1:37 am
Posts: 8
Reply with quote
Post Re: Very small request for One Man Army Mode
Nope, still getting the same error. Oh well, whatever. I don't play much anyway.


Thu Dec 30, 2010 8:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 15 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.030s | 14 Queries | GZIP : Off ]