Data Realms Fan Forums http://45.55.195.193/ |
|
Limiting Buy List? http://45.55.195.193/viewtopic.php?f=1&t=15084 |
Page 1 of 2 |
Author: | Kyred [ Sun May 31, 2009 1:12 am ] |
Post subject: | 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" }; |
Author: | Geti [ Sun May 31, 2009 1:19 am ] |
Post subject: | 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. |
Author: | Grif [ Sun May 31, 2009 1:22 am ] |
Post subject: | 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. |
Author: | Kyred [ Sun May 31, 2009 1:26 am ] |
Post subject: | Re: Limiting Buy List? |
Darn. Oh well, at least this isn't a crucial feature for making a mission. Thanks for the help. |
Author: | Rawtoast [ Sun May 31, 2009 2:06 am ] |
Post subject: | Re: Limiting Buy List? |
You could make a Lau script tha destroys weapons you don't want in your mod. |
Author: | mail2345 [ Sun May 31, 2009 2:39 am ] |
Post subject: | Re: Limiting Buy List? |
Rawtoast is right. Same with anything else you don't want. |
Author: | Rawtoast [ Sun May 31, 2009 2:11 pm ] |
Post subject: | 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? |
Author: | Grif [ Sun May 31, 2009 4:28 pm ] |
Post subject: | 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. |
Author: | Rawtoast [ Sun May 31, 2009 5:11 pm ] |
Post subject: | 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. |
Author: | Grif [ Sun May 31, 2009 5:28 pm ] |
Post subject: | 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. |
Author: | piipu [ Sun May 31, 2009 5:41 pm ] |
Post subject: | 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. |
Author: | mail2345 [ Sun May 31, 2009 5:43 pm ] |
Post subject: | 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 |
Author: | Grif [ Sun May 31, 2009 6:07 pm ] |
Post subject: | Re: Limiting Buy List? |
WHY TWO?!!! ONE WORKS FINE. |
Author: | Rawtoast [ Sun May 31, 2009 6:25 pm ] |
Post subject: | 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". |
Author: | piipu [ Sun May 31, 2009 6:41 pm ] |
Post subject: | Re: Limiting Buy List? |
It's lua and that wouldn't work because rtes are loaded when the game is started. |
Page 1 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |