jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

[ENH] set command for adding/editing npc trade location #93

Open jpcsupplies opened 8 years ago

jpcsupplies commented 8 years ago

we can do this editing data but we need a in game command for it to comply with #88 just looking over code now to see if its something i can do somehow but may require more work than someone up at 1:30am will have the concentration to complete at once lol

jpcsupplies commented 8 years ago

ok lets keep this simple too - this is for moving or adding NPC trade locations /tradezone command -
(or maybe just /NPC ?)

/NPC create {coords} /NPC delete {coords} /NPC list {show list of NPC zones coords}

~~Bonus points: Integrate this with the player trade zones - only they can only configure their own zones. Limit of 2 references for a given player zone max (1 fixed, and 1 mobile) - both zones use the same stock database. (limit to one trade database per player)~~

midspace commented 8 years ago

This first set of code is in and works.

Not complete is:

jpcsupplies commented 8 years ago

Just to clarify - We have two distinct types of zone. 1: The NPC zone (multiple locations shared inventory, more flexible with regard to zone overlap with itself, but can only be configured by admins) 2: Player/faction Zone (different type of zone, not related to this issue as yet, but shouldn't overlap unless related to coping with "portable" trade zones (eg trade ships))

This issue refers to type 1 only at this point in time.

But in so much as type two is concerned, we could consider something like being able to create additional "NPCs" with separate inventories - the function we can later use when registering zones against players or factions. But really that is over complicating things this early on.

Main aim here is extending the current economy mod functionality of allowing the npc zone to move or be in more than one location which admins already have by manually editing the xml file, but giving them an in-game command to remove the need to manually edit the XML.

Hopefully that makes sense :/

jpcsupplies commented 8 years ago

http://steamcommunity.com/sharedfiles/filedetails/?id=481264606 Current command structure for npczone added to manual.

I've also added option parameter for pricelist command to your list above

the move command could simply be that if you use /npczone add "Hell" 123 456 789 5000 sphere and zone "Hell" already exists, overwrite it with the new coords?

Also dont forget some way to add "where you are now" support.. ill add that too the tick list

jpcsupplies commented 8 years ago

Is it worth adding somewhere the facility to generate a GPS point on entering a trade zone? It would need to have some sort of conditions such as an active powered antenna or an active powered economy price display (we could use the same polling cycle as the LCD so we have 0 impact on performance; while at the same time forcing players to have price displays on their ships). Either that or a simple welcome message, but I assume that would require more overhead than simply an if not exist make gps point sort of thing.

If we wanted to be real smart asses add a sound asset to the game "Ding... trade zone detected" tradezone2 altered.zip beep tradezone detectd.zip