View unanswered posts | View active topics It is currently Thu Jan 09, 2025 11:33 pm



Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
 Limiting Buy List? 
Author Message
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Limiting Buy List?
Is there a way to limit the buying menu to only certain weapons, bodies, tools, and crafts for a particular activity/mission? For example, making it so that you can only buy stuff from the Dummy Fraction or the Coalition Fraction.

I was looking through the lua scripts of some of the missions and noticed a few lines of code that seem to do what I am attempting to do (below). However, it doesn't seem to be implemented in game. Is there anyway, currently, to get something like this working? Preferable without having to remove .rte folders from the Cortex Command directory.

Code:
//From MaginotMission:StartActivity()
    self.WList = { "Grenade Launcher", "Blaster", "Nailgun", "Rail Pistol", "Sniper Rifle", "Repeater", "Destroyer Cannon", "Annihiliator", "Nailer Cannon" };
    self.BList = { "Impulse Grenade" };


Sun May 31, 2009 1:12 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Limiting Buy List?
those lists are for randomising the enemy's weapons in-game, not for what you can buy. notice that in those lists, dummy weapons are the only things there. what do the dummies attack with in maginot? dummy weapons.


Sun May 31, 2009 1:19 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Limiting Buy List?
In conclusion no, there's no way to do that now, though future builds should feature something that allows you to do so.


Sun May 31, 2009 1:22 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Limiting Buy List?
Darn. Oh well, at least this isn't a crucial feature for making a mission. Thanks for the help.


Sun May 31, 2009 1:26 am
Profile
User avatar

Joined: Mon Apr 06, 2009 9:41 am
Posts: 712
Location: New York
Reply with quote
Post Re: Limiting Buy List?
You could make a Lau script tha destroys weapons you don't want in your mod.


Sun May 31, 2009 2:06 am
Profile YIM
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Limiting Buy List?
Rawtoast is right.

Same with anything else you don't want.


Sun May 31, 2009 2:39 am
Profile
User avatar

Joined: Mon Apr 06, 2009 9:41 am
Posts: 712
Location: New York
Reply with quote
Post Re: Limiting Buy List?
I don't know much about Lau - just how to copy paste familiar looking things into what seems like the right places - but would it be possible to change the "buyable" variable in other inis?


Sun May 31, 2009 2:11 pm
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Limiting Buy List?
Yes, but you'd have to manually--well, no. You could parse through all items and then set them to buyable, probably.

Also, it's lua.


Sun May 31, 2009 4:28 pm
Profile
User avatar

Joined: Mon Apr 06, 2009 9:41 am
Posts: 712
Location: New York
Reply with quote
Post Re: Limiting Buy List?
Grif wrote:
Yes, but you'd have to manually--well, no. You could parse through all items and then set them to buyable, probably.

Also, it's lua.


Wait, but without going into other ini files and changing them, you could have a Lua script change that variable?

Also, sorry, I have a friend named Lau - was just talking to her.


Sun May 31, 2009 5:11 pm
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Limiting Buy List?
Yes, I'm fairly sure you could.

You just need to read all inventory items and craft and then do device.Buyable = 0, basically.


Sun May 31, 2009 5:28 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Limiting Buy List?
Except it would only make all the items already existing on the scene not buyable which wouldn't matter. You can't access the .ini definitions with lua I think.


Sun May 31, 2009 5:41 pm
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Limiting Buy List?
I meant this:
Code:
for items in MovableMan.Items do
self.destroyitem = true
for k,v in pairs(self.Blist) do
if v.PresetName == items.PresetName then
self.destroyitem = false
end
end
if self.destroyitem then
items.Lifetime = 2
end
end


Sun May 31, 2009 5:43 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Limiting Buy List?
WHY TWO?!!!

ONE WORKS FINE.


Sun May 31, 2009 6:07 pm
Profile
User avatar

Joined: Mon Apr 06, 2009 9:41 am
Posts: 712
Location: New York
Reply with quote
Post Re: Limiting Buy List?
piipu wrote:
Except it would only make all the items already existing on the scene not buyable which wouldn't matter. You can't access the .ini definitions with lua I think.


But you could have the Lua trigger a different script, right? For instance, you could write up an Applescript that would change the file extensions of all unwanted rtes in resources to something Cortex Command wouldn't care about. When the scene loads up, a Lua script would trigger the Applescript, and bam, only what you want is buyable. When you win or lose the match, another lau script triggers another applescript which would change back all the rte files.

Then again, I don't know (remember even less) much about programming, so I could be totally off.


Edit: Spelling fixed. Gotta stop saying "Lau".


Last edited by Rawtoast on Sun May 31, 2009 6:46 pm, edited 1 time in total.



Sun May 31, 2009 6:25 pm
Profile YIM
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Limiting Buy List?
It's lua and that wouldn't work because rtes are loaded when the game is started.


Sun May 31, 2009 6:41 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: Google [Bot]


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.074s | 14 Queries | GZIP : Off ]