Welcome to the Builder Academy

Question Shops - Zedit having issues with inventory

More
02 Apr 2017 16:01 - 02 Apr 2017 16:03 #6621 by Sascha
Making one of our first shops. To test it, I loaded in just 781 via zedit and it worked.

[Command list]
0 - Load Zachary Linatt [710], Max : 1
1 - Give it a longsword [781], Max : 99
2 - <END OF LIST>
N) Insert new command.

list
## Available Item Cost
1) Unlimited A longsword 4

i1 500H 100M 82V >
buy 1
Zachary Linatt tells you, 'That'll be 4 coins, thanks.'
You now have a longsword.

I then added the rest of the shop weapons and saved it.

[Command list]
0 - Load Zachary Linatt [710], Max : 1
1 - Give it a longsword [781], Max : 99
2 - Give it a plain shortsword [782], Max : 99
3 - Give it a longsword [783], Max : 99
4 - Give it a broadsword [784], Max : 99
5 - Give it a stout quarterstaff [785], Max : 99
6 - Give it a sharp dagger [786], Max : 99
7 - Give it a heavy club [787], Max : 99
8 - Give it a battle axe [788], Max : 99
9 - <END OF LIST>

I reset the mob, and suddenly the list is:

list
Currently, there is nothing for sale.

And when I check zedit it's now:

[Command list]
0 - Load Zachary Linatt [710], Max : 1
1 - <Unknown Command>
2 - <Unknown Command>
3 - <Unknown Command>
4 - <Unknown Command>
5 - <Unknown Command>
6 - <Unknown Command>
7 - <Unknown Command>
8 - <Unknown Command>
9 - <END OF LIST>

Question: Did the Builder do something wrong, or is there a phantom bug that I need to address?

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000
Last edit: 02 Apr 2017 16:03 by Sascha.

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 16:26 #6622 by Sascha
After discussion we went in and made the load in zedit dependent upon the prior one(s) and it seems to be holding - or at least it has through five test purge and zone resets. We'll keep an eye on this one shop and revisit it after reboot. However, if there is any input as to why this has happened that would be awesome information. Thanks!

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
02 Apr 2017 18:49 #6623 by Sascha
This is now pretty much a moot point kind of question unless someone wants to point out what could create that error. The workaround for it that our Imp came up with is to create a trigger that loads the mob's worn items and inventory, bypassing zedit altogether, which also makes things less labor intensive especially when it comes to common mobs like soldiers, etc.

Will you stand against the coming Storm? After the Breaking: STORMRIDERS MUD - atbmud.dune.net port 4000

Please Log in or Create an account to join the conversation.

More
03 Apr 2017 21:40 #6624 by Rumble
The <unknown command> appears when a builder creates an illegal command or deletes dependent commands "parent." I see it occasionally but I can't remember any specifics of how it happens.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

More
03 Apr 2017 22:36 #6625 by WhiskyTest
Hi Sascha
When loading objects to a mob for selling you will need to set them to be dependent on the success of the previous command (the mob loading). It should look like this:
0 - Load Zachary Linatt [710], Max : 1
1 - then Give it a longsword [781], Max : 99
2 - then Give it a plain shortsword [782], Max : 99
3 - then Give it a longsword [783], Max : 99

Regarding the <Unknown Command> messages.. I'd start by checking the zone files in a text editor and confirming they are saved correctly. The function zedit_disp_menu() in zedit.c is what looks at the file for each command and checks if it is valid.

Please Log in or Create an account to join the conversation.

More
29 Apr 2017 23:43 #6675 by Parnassus

Sascha wrote: [Command list]
0 - Load Zachary Linatt [710], Max : 1
1 - Give it a longsword [781], Max : 99
2 - Give it a plain shortsword [782], Max : 99
3 - Give it a longsword [783], Max : 99
4 - Give it a broadsword [784], Max : 99
5 - Give it a stout quarterstaff [785], Max : 99
6 - Give it a sharp dagger [786], Max : 99
7 - Give it a heavy club [787], Max : 99
8 - Give it a battle axe [788], Max : 99
9 - <END OF LIST>

Question: Did the Builder do something wrong, or is there a phantom bug that I need to address?


If you look at this logically, each command is its own entity. This changed when you made the load dependent on the first command. So let's look at it without that first command.
1 - Give it a longsword [781], Max : 99

Remember, you're looking at this as a COMPLETE entity, independent of any previous commands.

So, logically, what is IT? The trigger tries to give it a longsword but can find no "it" to give the longsword to. It could have been worse though. The trigger might have given it to anything that started with an IT, such as Italian.
The following user(s) said Thank You: Sascha

Please Log in or Create an account to join the conversation.

Time to create page: 0.194 seconds