Jump to content

Need Help With Manufacturing


aajs

Recommended Posts

I need some help here and cant find the answer in any other thread.

Basically I have 3 weapons that get researched... Then I have another research round the replaces the first weapons using replaceitem(X,Y).

I have the unlockmanufacture setup against each of the weapons. However once my weapons have been swapped out for the new ones I still have entries to manufacture the old ones that no longer exist.

How can this be resolved?

I was looking for something like replacemanufacture(X,Y) but that is not available.

Link to comment
Share on other sites

It might not be possible. At least in vanilla, the replaceitem function is used only on items that you don't manufacture. Indeed, I was under the impression that replaceitem doesn't work on non-infinite items (although that's clearly not the case!).

You could try something like 'lockmanufacture' and see if that will lock the projects you don't want available any more. It's a long shot - the function probably doesn't exist - but if replaceitem doesn't work it's about all I can think of.

(Incidentally, what happens when you produce the old items? Do they come out as new ones anyway, or are they the pre-upgraded ones?)

Link to comment
Share on other sites

Thanks for the help I tried the long shot but it didn't work.

If I try to produce the old items nothing happens. The item does not get created at the end of the manufacturing process, however it does not crash.

I tried replacing items with nothing "" which effectively makes them disappear which is also useful however the manufacturing parts are still there. A RemoveManufacture or DeleteManufacture would have been real helpful.

I will play around with it for a bit and see If I can produce anything workable.

Link to comment
Share on other sites

Well I tried everything I could think of but no success.

I was hoping to have tiers of weapons in my mod that could be improved replacing the old ones. But have some of them that could be sold off at a slight profit and thus opening up a bit of a mini game based on trading opportunities. However I think this is going to be a bit of a dead end as its very confusing for players to be able to spend time and money creating something that effectively no longer exists and cant be sold.

Unless anybody has done anything clever here, then I will just convert my mod back to having boring infinite weapons, either that or 40 plus weapons in the ballistic weapons menu.

Link to comment
Share on other sites

Something that I'd thought of that might be a kind of work around is having manufacturing projects required in order to unlock a tier of weapons. So you research the required tech, complete the manufacturing project (which produces an item required for the follow-up tech) and then you complete the process with a final research project (which could be free or require time, either way would work) which upgrades the weapons.

It's not exactly the same as what you wanted, but what that allows you to do is have upgradeable weapons and have those upgrades cost resources, albeit a cost which is paid all in one go rather than on the basis of individual weapons. You might not like it, but I thought I'd throw it out there as an idea.

Link to comment
Share on other sites

Could you just remove the automatic upgrade and instead unlock a manufacturing job that upgrades to your new weapon by using one of the old weapons as a material?

So instead of:

You have a manufacturing job for Gun1 and one unit built.

You finish your research, your Gun1 unit upgrades to Gun2 and the Gun1 job stops working but you unlock a Gun2 manufacturing job.

It might look like:

You have a manufacturing job for Gun1 and one unit built.

You finish your research, you unlock a Gun2 manufacturing job and a Gun1 to Gun2 upgrade job.

Your previously built Gun1 stays as it is until you either decide to sell it or use it as parts to build a Gun2.

Link to comment
Share on other sites

It might not be possible. At least in vanilla, the replaceitem function is used only on items that you don't manufacture. Indeed, I was under the impression that replaceitem doesn't work on non-infinite items (although that's clearly not the case!).

You could try something like 'lockmanufacture' and see if that will lock the projects you don't want available any more. It's a long shot - the function probably doesn't exist - but if replaceitem doesn't work it's about all I can think of.

(Incidentally, what happens when you produce the old items? Do they come out as new ones anyway, or are they the pre-upgraded ones?)

I test one time ago the command "LockManufacture" with catastrophic effects. You didnt imagine what happend next... is weird

Link to comment
Share on other sites

Well...

I've tried

DeleteManufacture

RemoveM...

ReplaceUnlockM...

gosh, I've even tried

LockUnlockManufactures :D

No dice.

Could you just remove the automatic upgrade and instead unlock a manufacturing job that upgrades to your new weapon by using one of the old weapons as a material?
That's a brilliant idea if the code allows it!

Edit:...hmm but it wont solve the

"40 plus weapons in the ballistic weapons menu."... meh I hate this code :P

Edited by Theon Greyjoy
Link to comment
Share on other sites

I have decided I am going to have a few tiers as "unlimited on research" then when I change my weapons to fire Depleted Alenium rounds then the barrels will need to be especially hardened etc..etc...At this point I am going to make the player use alien alloys and create the manufacturing for profit possibility there. Any upgrades after that, I will put along side the existing tier but try to make it so that the previous version still has some value as an option. I think that will work out OK.

Link to comment
Share on other sites

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...