Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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" );

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...