aajs Posted April 19, 2015 Share Posted April 19, 2015 Hi All, When the user first starts the game I want to have a set number of items in the store. e.g. 10 rifles. I have set them to "Normal" so they can be manufactured, but where do I edit to set the starting numbers. I have seen this working in other mods but have no idea how its done. Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted April 19, 2015 Share Posted April 19, 2015 Never done it myself, but your answer lies in the _basebuilt script which prepares your first base for use. I'm pretty sure you want to alter some of the commented out lines, namely: --StockItemForFirstBase( "weapon.AlienPlasmaPistol", 1 ); Try uncommenting that, set it to whatever weapon you want stocked, then rinse and repeat for each item. Quote Link to comment Share on other sites More sharing options...
aajs Posted April 20, 2015 Author Share Posted April 20, 2015 Very nice The stock item works as I can see it in the stores, Any idea why my unlock item does not work? UnlockKnowledge( "DefenceBattery" ); UnlockResearch( "Researches.AlienInvasion" ); StockItemForFirstBase( "weapon.pistol", 2 ); UnlockItem( "weapon.pistol" ); Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted April 20, 2015 Share Posted April 20, 2015 Err.... Uhhh..... If you mean making them manufactured items, I believe it's UnlockManufacture, not UnlockItem. Quote Link to comment Share on other sites More sharing options...
aajs Posted April 20, 2015 Author Share Posted April 20, 2015 Aha haa got it thanks so much Max, you are a fountain of knowledge. you have to have all 3 entries then it works. 1) Set item in items.xml to normal 2) Create manufacture.xml entry so it can be crafted 3) UnlockItem( "weapon.pistol" ); in _basebuilt script to unlock it so that it can appear in the weapons list 4) StockItemForFirstBase( "weapon.pistol", 2 ); in _basebuilt script to set the amount of items you want in your base 5) UnlockManufacture("ManTech.pistol"); also add this entry to the _basebuilt script so that the game internals know how to link the weapon in the store to the weapon entry you unlocked. (You need this even though you don't need to manufacture anything yet) Err....Uhhh..... If you mean making them manufactured items, I believe it's UnlockManufacture, not UnlockItem. Quote Link to comment Share on other sites More sharing options...
aajs Posted April 23, 2015 Author Share Posted April 23, 2015 Thanks Max, I finally got it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.