Tags

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
TabletopTimeTurner
Red Slime
Posts: 56
Joined: Fri Mar 25, 2016 1:33 am
Location: hell my dudes

Tags

Post by TabletopTimeTurner »

I'm having a hard time really understanding tags, right now I have a part where there's a bunch of foemaps all around and I want to have it so that after talking to and fighting this npc the enemies stop appearing. and i've been trying different ways of doing this but I can't seem to figure it out.
Earlier I used tag 2 for a dialogue to jump to a different text box and stuff and how it's set up right now is

On the second and last text box before you fight npc 1 the tags are set as
Set Tag 2=OFF [autoset] (Yes)
Set Tag 1=ON (Unchangeable)

And for the formation set it's put as
Only if tag 2=ON (yes)

so how i think it's supposed to work is after fighting the npc tag 2 will change from on to off and the formation set should only work if tag 2 is on so random encounters should stop happening. I've tested this out a bit but i still get random encounters after the fight and i'm really not sure what i'm doing wrong.
User avatar
Pepsi Ranger
Liquid Metal Slime
Posts: 1457
Joined: Thu Nov 22, 2007 6:25 am
Location: South Florida

Post by Pepsi Ranger »

I don't know if you've given plotscripting a try yet, but I think the easiest thing for you to do is to write a short script that checks the current map and the tag, and turns off random enemies if the conditions are true. Something like:

Code: Select all

script,no more enemies,begin
if ((current map==1),and,(check tag (2))) then(
suspend random enemies
)
if &#40;&#40;current map<>1&#41;,or,&#40;check tag &#40;2&#41;==false&#41;&#41; then&#40;
resume random enemies
&#41;
end
Note that this script assumes that you only want this to work on map #1. If you want it to work across each map the player progresses through, then you'll need to add more to this script.

You could also use fake foemaps and zones to your advantage, and probably do it more effectively than my general example above, but that'll take a bit more plotscripting, which you should totally learn if you haven't already. It's not hard, and it can be lots of fun, and you should just give it a try.

There's my two cents.
Place Obligatory Signature Here
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Re: Tags

Post by TMC »

TabletopTimeTurner wrote:Set Tag 2=OFF [autoset] (Yes)
This is your problem. "[autoset]" indicates that you've defined a condition somewhere that automatically sets this tag on or off, for example you might have selected it as the "Is in inventory" tag for one of your items. This will undo any attempts to use "set tag" conditions, they either do nothing or get reverted soon after. To see exactly what the autoset condition is, select that line and press Enter to see the list of tags, then press Tab.

Also, I notice that you've called this tag 'Yes', which suggests that you're trying to reuse it for yet another purpose. Don't try to save on the number of tags you use instead of creating new tags, it'll just lead to confusing bugs like this one. And always give your tags names, so that you know whether you're already using them, and where.

I guess that we ought to display ERROR! somewhere if you try to set an autoset tag, or at the minimum display [autoset] in flashing red font.
Last edited by TMC on Mon Jul 25, 2016 9:13 am, edited 2 times in total.
User avatar
TabletopTimeTurner
Red Slime
Posts: 56
Joined: Fri Mar 25, 2016 1:33 am
Location: hell my dudes

Re: Tags

Post by TabletopTimeTurner »

TMC wrote:
TabletopTimeTurner wrote:Set Tag 2=OFF [autoset] (Yes)
This is your problem. "[autoset]" indicates that you've defined a condition somewhere that automatically sets this tag on or off, for example you might have selected it as the "Is in inventory" tag for one of your items. This will undo any attempts to use "set tag" conditions, they either do nothing or get reverted soon after. To see exactly what the autoset condition is, select that line and press Enter to see the list of tags, then press Tab.
So I tried to follow what you said and I made a new tag specifically for the foemaps, but I'm still having problems because enemies still keep showing up. Here are the conditions and stuff I have

edit: it seems that the other screenshot isnt appearing so here's a look to the screenshots on img i guess.

http://imgur.com/a/3CwAw
Attachments
Screen Shot 2016-07-26 at 3.16.13 PM.png
Screen Shot 2016-07-26 at 3.16.13 PM.png (83.87 KiB) Viewed 776 times
Screen Shot 2016-07-26 at 3.16.28 PM.png
Screen Shot 2016-07-26 at 3.16.28 PM.png (49.91 KiB) Viewed 463 times
Last edited by TabletopTimeTurner on Tue Jul 26, 2016 8:23 pm, edited 2 times in total.
User avatar
Feenicks
Metal Slime
Posts: 697
Joined: Tue Aug 10, 2010 9:23 pm
Location: ON THE AIR IN THE AIR
Contact:

Post by Feenicks »

You have to set the 'set tag' conditional to always trigger, which you do by highlighting the line that starts with SET TAG and pressing left once. You can also press enter and choose what specific tag you'd need on or off before the tag would be set on, but you don't seem to need that functionality right now.

Don't worry, it's tripped me up a few times before.
User avatar
TabletopTimeTurner
Red Slime
Posts: 56
Joined: Fri Mar 25, 2016 1:33 am
Location: hell my dudes

Post by TabletopTimeTurner »

Pheonix wrote:You have to set the 'set tag' conditional to always trigger, which you do by highlighting the line that starts with SET TAG and pressing left once. You can also press enter and choose what specific tag you'd need on or off before the tag would be set on, but you don't seem to need that functionality right now.

Don't worry, it's tripped me up a few times before.
OHHHHHH, thanks man I missed that part completely thank you so much
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Hmm, that interface could be improved as well. For example, the actions like "set tag X", "add/remove item X" could be hidden if the condition above them is set to "Never do the following". That would force you to change the condition to something else. But hiding which actions are available until you change the condition is also not so great. So a better idea may be to show the actions greyed out and uneditable when they're disabled.

Suggestions for improved user interface anywhere in the engine are highly welcome! What do people find unintuitive?
Post Reply