Adding Items to Merchant

Red Beard

Part-Time helper.... Full Time Lurker
Reaction score
32
Righto

As a reward from a quest, the local potion shop sells a greater variety of potions

By using the Trigger

Event:
Neutral Building: Add <item> to <shop> with (x) in stock and max stock of (y)
The 'level' of success determines the amount in stock and its max stock.

However, regardless of how many are in stock, once purchased, the item is removed from the shop. This was not my intention.

Having considered many possibilities (Filling the <Items made> field, and searching for a perhaps conflicting trigger that removes them) I am at a loss as to why this is occuring?

The conflicting Trigger I had considered was the hero purchase, but as a hero is a unit this, and a boolean check of Hero, makes this seem impossible.

Has anyone come across this problem before?
Solutions to fix it?
 
Red Beard said:
Righto

As a reward from a quest, the local potion shop sells a greater variety of potions

By using the Trigger

Event:
Neutral Building: Add <item> to <shop> with (x) in stock and max stock of (y)
The 'level' of success determines the amount in stock and its max stock.

However, regardless of how many are in stock, once purchased, the item is removed from the shop. This was not my intention.

Having considered many possibilities (Filling the <Items made> field, and searching for a perhaps conflicting trigger that removes them) I am at a loss as to why this is occuring?

The conflicting Trigger I had considered was the hero purchase, but as a hero is a unit this, and a boolean check of Hero, makes this seem impossible.

Has anyone come across this problem before?
Solutions to fix it?

Can you post the triggers?
 
Removed some length non essential stuff

Sure. Seeing as nobody has been able to solve this.

If there is a better way to organise different parts, feel free to suggest some methods.

Code:
quest 3 part c
    Events
        Time - Quest_Timer expires
    Conditions
    Actions
        Trigger - Turn off Multiboard Countdown <gen>
        Multiboard - Set the text for (Last created multiboard) item in column 1, row Multi_Quest_Title to Time Up
        Multiboard - Set the color for (Last created multiboard) item in column 1, row Multi_Quest_Update to (100.00%, 80.00%, 20.00%) with 0.00% transparency
        Cinematic - Ping minimap for (All players) at (Center of (Playable map area)) for 55.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Quest_Count + Quest_Count_2) Less than or equal to 5
            Then - Actions
                Quest - Mark Quest_3 as Failed
                Quest - Display to (All players) the Quest Failed message: You failed to find ...
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Quest_Count + Quest_Count_2) Equal to 6) or ((Quest_Count + Quest_Count_2) Equal to 7)
                    Then - Actions
                        Quest - Mark Quest_3 as Completed
                        Quest - Display to (All players) the Quest Completed message: You have found enou...
                        Neutral Building - Add Greater Potion of Healing to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Greater Potion of Mana to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Potion of Magical Influx to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Potion of Regeneration to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Potion of Rejuvenation to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Potion of Revitilisation to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                        Neutral Building - Add Elixer of Life to Goblin Merchant 0008 <gen> with 1 in stock and a max stock of 1
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Quest_Count + Quest_Count_2) Equal to 8) or ((Quest_Count + Quest_Count_2) Equal to 9)
                            Then - Actions
                                Quest - Mark Quest_3 as Completed
                                Quest - Display to (All players) the Quest Completed message: You have found enou...
                                Neutral Building - Add Greater Potion of Healing to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Greater Potion of Mana to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Potion of Magical Influx to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Potion of Regeneration to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Potion of Rejuvenation to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Potion of Revitilisation to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                                Neutral Building - Add Elixer of Life to Goblin Merchant 0008 <gen> with 3 in stock and a max stock of 3
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Quest_Count + Quest_Count_2) Equal to 10
                                    Then - Actions
                                        Quest - Mark Quest_3 as Completed
                                        Quest - Display to (All players) the Quest Completed message: You have found more...
                                        Neutral Building - Add Greater Potion of Healing to Goblin Merchant 0008 <gen> with 0 in stock and a max stock of 5
                                        Neutral Building - Add Greater Potion of Mana to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                        Neutral Building - Add Potion of Magical Influx to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                        Neutral Building - Add Potion of Regeneration to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                        Neutral Building - Add Potion of Rejuvenation to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                        Neutral Building - Add Potion of Revitilisation to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                        Neutral Building - Add Elixer of Life to Goblin Merchant 0008 <gen> with 5 in stock and a max stock of 5
                                    Else - Actions
 
Well although there may be a simpler way, you could set an integer variable to the number you can buy, when you buy it set it to -1 then add another, if its 0 then dont add one...
 
:confused:

Sorry, but how would i assign an integer variable to items sold in the Merchant?

The only triggers available that deal with neutral buildings are Add, add to all, remove, remove from all, limit item slots, limit item slots for all.

Unless you mean that scary "assign custom value" thingamajigger doovelaky hoogerwhatsit.
 
Um no, say you win with 100% so you get 10 items at the shop. the item you win is a potion of healing. You would set integer variable 'PotionOfHealing' to 10, then when you buy it set to (PotionOfHealing - 1), check how many are left. If 0 are left then do nothing, if more than 0 add another to the shop
 
The thing is, once you buy an added item. It is no longer SOLD at all. Blank square just like it was before they were added. Regardless of how many are in stock.

I could always do something like this
Code:
Event: Unit Sells an Item
Condition: Selling unit is Goblin Merchant
Action: Add <sold Item> to Goblin merchant

That would solve the problem of the item disappearing, but than stock delays become invalid, and so would the 'level of success', (Which basically is the amount of ingredients you find is directionally proportional to the amount of potions available.)
 
> Neutral Building: Add <item> to <shop> with (x) in stock and max stock of (y)

You know, this action works just fine. And as you expect it to work.
But (you knew there'd be a but), only if the "neutral building" actually belongs to the player...

Slightly less "neutral" than expected. Don't ask me... ;)
 
?? week old post?

Grave digging Ace? :P

Ah.. Right, well that really sucks doesnt it.

I had the reward set for the code i put up above. Where the 'level of success' was the number of charges in the item sold.

But, seeing as you pointed this out.... (Thanks)
I could just make the Shop belong to the "allied computer" and all would be fine right?
 
i have shops owned by neutral passive selling units(not items), it works.
 
now im no expert but i think i might have an idea

you should have the shop that u wnat to add items to.
when the event that determines when your 'reward' happens, just replace the shop with another unit that you'll have to make

make the new unit have the updated potions...and you can continue doing that every update, if there is more..so thers no fancy triggers needed here.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper
  • Stephen Stephen:
    Oh no - please don't lose the Nuon content
    +1
  • The Helper The Helper:
    Someone email AtariAge and see if they want me to transfer the forum data over to it
  • Ghan Ghan:
    Could probably keep NUON stuff around here if we wanted.
  • Ghan Ghan:
    Hmm what to do about the World Editor site though?
  • Stephen Stephen:
    I'd rather personally just own a backup of the Nuon data than see it go to AtariAge honestly. If it gets enshittified as per usual, or if some of the "regular" Jaguar folks get there, it's not gonna be fun
  • The Helper The Helper:
    There will be a github of the forum data so the NUON Forum Data I guess would be available there
  • The Helper The Helper:
    World Editor is technically Ryoko stuff not mine you guys can keep that I am not in that even
  • jonas jonas:
    :( end of an era :(
  • The Helper The Helper:
    Dont think of it as an end jonas - think of it as a beginning, because really my friend that is what it is.
  • A Andyoyo:
    Thank you for the hard work over the years. It did not go unnoticed.

The Helper Discord

Staff online

  • Ghan
    Administrator - Servers are fun

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top