I have finally finished implementing and testing the Inventory feature in the Mission-X plugin.
The most demanding and complicated part, was the integration with the logic mechanism. It is fun to just move staff from one place to another, but it is more fun to implement it as a mission requisite.
Anyway, this is my first attempt in implementing it, so it has some limitations.
Here is a short description of how it should work ( limited to v1.20 build 37 ):
- Inventory is limited to 5 items both on plane and store. Every item has its own amount, so you are not limited in amount.
- Each item has a unique barcode ( string value ). The name of the item is displayed.
- Every item has weight and price, though only weight is implemented.
- The logic mechanism of item, is simpler, in away, then the DataRef one ( if you used it ):
First, you have to define an item reference ( barcode + store )
First, define a "checkSet" condition.
The CheckSet condition logic, will include IF specific inventory logic ( see Designer Guide ) that will hold the store's name
Second, Define an operative logic (LogicForSuccess) that will execute the "checkSet" condition. - The Relevant logic to test the inventory ( but it is not limited to ) is the "LogicForSuccess". This way you can mark an Objective as success, if the simmer delivers the goods to the correct store.
- The plugin will only execute success events for inventory logic, therefore, there is no need to define "else" event ( I think it is hard coded into the plugin )
- Do not add "Then" condition to the inventory "CheckSet" logic, it is not part of the design but I'm not saying it will not work.
If you need to apply logic, then use a success "Event" where you can implement other logics and messages ( this might change until final build )