Requests for 'mapper toys'

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
I have some requests for mapper toys and I'm hoping some of them can be implemented one day.
This thread was originally gonna be about a single request (which I'll start with) but some other things came to mind.

Spawning a monster only after a certain entity is triggered (say, a key is picked up): Easy!
Spawning a monster during a certain time of day: Easy!
Spawning a monster during a certain time of day, but only after a certain entity is triggered: I can't think of a way to do this...

However, this would be easy if ms_monsterspawn (and msarea_monsterspawn, for those who still use that) had a master keyvalue. The event mstime_XX gets triggered every time it's XX hours, but the monster spawn entity (which would also be named mstime_XX) would only activate if its corresponding multisource has been triggered first. Can this be done?

The other requests (in order of importance, as far as I'm concerned):
  • trigger_hurt to recognize Mana as damagetype (for damage or regeneration).
  • func_breakable ability to directly spawn an item.
  • func_playerclip... should be self-explanatory but I'm not sure if this can be achieved easily.
  • other/sfx_orbiting_light custom colour, radius and angular velocity settings.
  • Edana clock hands (edana/clock_hourhand and edana/clock_minutehand) to be in sync with in-game time... They start in sync but don't stay like that for long. Come to think of it, this is more of a fix request rather than a new request.
  • triggers/trigger_cannon to be usable multiple times (the entity doesn't respond anymore after a single cannon ball has been shot through).
  • acid_immune and magic_immune params (just like fire_immune).
  • More damage types for weather/vapors other than fire, cold and poison.

Edit: Come to think of it, for a particular chain of entities I really need trigger_relay to have a master keyvalue as well. Could you please look into this, if you have time?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
MS:C community said:
Spawning a monster during a certain time of day, but only after a certain entity is triggered: I can't think of a way to do this...
Two trigger_relay's for one master multisource, one for the TOD, and another for the triggered entity, maybe? :\ Scripting likely simplest - can't really even think of a good way to deal with it via a new entity, save adding TOD range to trigger_relay, or something odd.

MS:C community said:
However, this would be easy if ms_monsterspawn (and msarea_monsterspawn, for those who still use that) had a master keyvalue. The event mstime_XX gets triggered every time it's XX hours, but the monster spawn entity (which would also be named mstime_XX) would only activate if its corresponding multisource has been triggered first. Can this be done?
Easier to stick a master on the trigger that activates the monsterspawn.

MS:C community said:
trigger_hurt to recognize Mana as damagetype (for damage or regeneration).
trigger_multiple with scriptevent "give_mp;#" (can be negative)

MS:C community said:
func_breakable ability to directly spawn an item.
func_breakble, target-on-break->msitem_spawn

Come to think of it, func_breakable's don't have origins, so short of that, I wouldn't know how to dependably place the object off hand - I'd have to look at the code to figure out how it's figuring where to shoot out debris from. It's probably just using bounds though (thus many debris being generated off map, in some instances, ya just don't see em), in which case, yeah, can't auto-place the entity reliably.

MS:C community said:
func_playerclip... should be self-explanatory but I'm not sure if this can be achieved easily.
One of the great mysteries of our time. Closest we got is a trigger_push flagged to only affect players.

MS:C community said:
other/sfx_orbiting_light custom colour, radius and angular velocity settings.
Edit the script, stick in test_scripts, set ms_dev_mode 1, magic... Might be able to rig it up to be more dynamic without that though - think it was written up before the advent of addparams.

MS:C community said:
Edana clock hands (edana/clock_hourhand and edana/clock_minutehand) to be in sync with in-game time... They start in sync but don't stay like that for long. Come to think of it, this is more of a fix request rather than a new request.
func_rotating velocity is not consistent between listenservers and HLDS servers, so, nadda can do. It might be possible to use an msarea_scripted instead, and point it to specific angles, rather than affecting its velocity. Be a whole new script though - can't fix the existing clocks that way without editing the maps.

MS:C community said:
triggers/trigger_cannon to be usable multiple times (the entity doesn't respond anymore after a single cannon ball has been shot through).
Think you need to grab an item to reload it or some such, can't recall - I'll have to check the script. :\ There's more than one variant of that script though, IIRC.

MS:C community said:
acid_immune and magic_immune params (just like fire_immune).
more damage types for weather/vapors other than fire, cold and poison.
Maybe I'll rig up something more generic, like set_takedmg;<element>=<ratio>

Trixie to work out XP adjustment for that though.

MS:C community said:
Edit: Come to think of it, for a particular chain of entities I really need trigger_relay to have a master keyvalue as well. Could you please look into this, if you have time?
Does it not already have one? Uses base trigger so, I think it should... Ya might try adding the property manually, and see what happens. Tell me if that works, I'll update the FGD.

Next patch, msarea_music, msarea_transition, and a few others are having a master property added, code side. Didn't think to check trigger_relay - though I could see it glitching if you assigned it the same master it was targeting.
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
Thothie said:
Easier to stick a master on the trigger that activates the monsterspawn.
Herein lies the problem; the trigger that is supposed to activate the ms_monsterspawn is the event mstime_11 (or mstime_14, or mstime_20, I'm not really saying) and I have no control whatsoever over that trigger.

Thothie said:
Does it not already have one? Uses base trigger so, I think it should... Ya might try adding the property manually, and see what happens. Tell me if that works, I'll update the FGD.
Tried this, does not work. Sure would have been nice because this would have solved every problem.

However, I have found a way to achieve what I'm trying to achieve.
To recap: I want to spawn a monster during a certain time of day, but only after a certain entity is triggered. Since I can't name my ms_monsterspawn mstime_11 (because this event can get triggered at random or when a player manually changes the time), I had to come up with something new.
If I spawn weather/timer (after "a certain entity is triggered") I can just use the event hour_11 (or hour_14, or ...) and... well that's it, really. It was easy after all.

Thothie said:
trigger_multiple with scriptevent "give_mp;#" (can be negative)
Next patch, msarea_music, msarea_transition, and a few others are having a master property added, code side.
Awesome!

Thothie said:
One of the great mysteries of our time. Closest we got is a trigger_push flagged to only affect players.
I have –sort of– managed to figure out a func_playerclip-esque thing. You'll need to use VHLT though (specifically: tool textures only supported by VHLT).
  • Players and NPCs not wider than 36 units walk in hull 1
  • NPCs wider than 36 units walk in hull 2
  • Players crouch in hull 3
If you take a brush and texture it in CLIPhull1 and then take another brush (same size and position) and texture it in CLIPhull3, you can block players. 'Big' monsters (i.e. wider than 36 units) will be able to move through, like bears, reavers, animated armors but sadly, not-so-big monsters (regular skeletons, rats) will be blocked as well... It's rather half-assed but given specific monsters, it may yet be useful.

Thothie said:
Think you need to grab an item to reload it or some such, can't recall - I'll have to check the script. :\ There's more than one variant of that script though, IIRC.
Both cannon variants (the one in oceancrossing and the unused one which you have to manually load) work but even if you use triggers/trigger_cannon on a trigger_multiple, it'll only work once.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Glad ya figured something out... Though, right off, shouldn't be naming the monsterspawn for TOD event - becomes simpler to rig up conditionals with an intermediary inbetween.

MS:C community said:
I have –sort of– managed to figure out a func_playerclip-esque thing. You'll need to use VHLT though (specifically: tool textures only supported by VHLT).

• Players and NPCs not wider than 36 units walk in hull 1
• NPCs wider than 36 units walk in hull 2
• Players crouch in hull 3
If you take a brush and texture it in CLIPhull1 and then take another brush (same size and position) and texture it in CLIPhull3, you can block players. 'Big' monsters (i.e. wider than 36 units) will be able to move through, like bears, reavers, animated armors but sadly, not-so-big monsters (regular skeletons, rats) will be blocked as well... It's rather half-assed but given specific monsters, it may yet be useful.
Ah, vewy iintarestinque. Would explain why the larger mobs seem to have such crappy collision boxes, especially in regards to the map hull, and some other odd behavior that makes them difficult to work with.

Really big mobs have this strange ability to define their own collision boxes that kind of follow their contours, and ignore whatever bounding boxes are defined in the model or by the script, short of the script telling them to be completely passable. Makes crap like Undamael and the Abyssal Worm really hard to work with, as when they attack, you'd end up stuck inside of them, since these collision boxes follow the animations (which is a shame, as otherwise that collision box would be just awesome). Also makes the Aspect of Jammy ignore monster clips that are narrower than he is.

MS:C community said:
Both cannon variants (the one in oceancrossing and the unused one which you have to manually load) work but even if you use triggers/trigger_cannon on a trigger_multiple, it'll only work once.
Oh, you mean the recieving end only works once... That makes more sense. Receiving script was pretty map specific, but maybe I can tweak it out, or make an alternative. Granted, if you just need to blow something up, I think the cannon ball projectile itself is pre-set to do 1000 siege damage over a 150 unit radius. If a cannon ball, or other siege projectile, hits an msarea_scripted or other brush with helena/stonewall, helena/structure, or helena/woodenwall, it'll spit some gibs and remove itself. Sadly does nothing else useful (like fire a map event).

If you just need it to trigger a map event, you can try using a trigger_multiple set to only detect mobs (no script required), this *might* work, but I know projectiles and mobs aren't quite the same beast. Alternatively, could have it hit a lure and use the fire on death feature, but various issues come up, like mobs attacking it.
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
Request: A 'race friend/foe list'. I'm aware of the existence of the human, hguard, wildanimal, undead, vermin, spider, orc, goblin, rogue, demon, ant_red, torkie, necro, evil, good, nothing, hated and beloved races but I'm interested in how they interact with each other (friend/foe). Do you have a list for this somewhere?

Also:
Thothie said:
Does it not already have one? Uses base trigger so, I think it should... Ya might try adding the property manually, and see what happens. Tell me if that works, I'll update the FGD.
Doesn't work.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Damn - I might see about it, though I do see a potential problem with the way the targeting system works.

As for races, there's a link in the mapping tutorial, but it seems to have vanished... Updated and re-uploaded:
http://www.thothie.com/msc/factions.txt
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
This might be interesting for mappers: I came up with an even better way to trigger a "second event" (such as spawning a monster) during a certain time of day after a "first event" has been triggered because my previous method had a limitation. I haven't tested this yet but it should work. I might test it later today.

Old method:
  • Spawn a weather/timer NPC along with the first event.
  • At Hour N, the weather/timer NPC will activate the map event hour_n.
  • Just name your second event (example: an ms_monsterspawn entity) hour_n, where you replace n with the hour at which you want this event to happen.
Drawback: You can only have one such setup. In other words: If you spawn a weather/timer NPC, all entities that are named hour_n can (and eventually will) be triggered.

New, better method:
  • Use an ms_counter as a trigger_relay! The big advantage of ms_counter is that it has a "master" key. So have your ms_counter target your second event (which, in this case, can have whichever name you want) and be sure to name the ms_counter mstime_n (not hour_n as these events do not exist in the absence of a weather/timer NPC), where you again replace n with the relevant hour. Also make sure that the ms_counter is governed by a multisource by configuring its "master" key. Lastly, set its "count" key to value "1".
  • Have a multisource be triggered (activated) along with the first event and set its name to match the "master" key of the ms_counter.
  • Now that the multisource (the ms_counter's master) is active, at Hour N the map event mstime_n will trigger the ms_counter, because that is the name of the ms_counter (see above). The ms_counter will in turn activate the second event.
You can have multiple copies of this setup that function individually from each other because each copy can have its own master.
The only theoretical drawback I see here is: ms_counter doesn't seem to have a "Remove On fire" spawnflag (so that means a single ms_counter could be fired multiple times, assuming mstime_n is triggered multiple times during regular gameplay) but the easy fix for this is: Target ms_counter's master again, as soon as the second event is fired, to disable the ms_counter.

Why am I spending so much time on this? I suppose it's kind of a spoiler but at some point, in Vestibule of Wind, I want to spawn a bunch of monsters during a certain time of day, but only after the majority of the map has been beaten.

Still working on Vestibule of Wind and it won't be done for at least another two weeks, but I'm making great progress.

Oh and @Thothie, a minor thing for the MS:C FGD: ms_counter shows the "master" key twice, reason being that the entity (as it is defined in the FGD) uses the Trigger BaseClass and has the "master" key explicitely defined in its properties.
I'm not sure if duplicate keys can cause issues, but it's better to be safe than sorry (so I removed the key definition from my ms1.4.fgd).

And a question: Does the "reqavghp" key work on NPCs?
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Gotta be an easier way to do that... But I suppose, a ms_counter, counting however many mobs you want dead, unlocking a trigger_relay with the specific hour you want would work. Flag it remove on fire, if you only want it once.

Dun think you need weather/timer anymore though. The GM fires "mstime_XX" and "hour_counter" every world hour, or should, at least.

MS:C Community said:
Oh and @Thothie, a minor thing for the MS:C FGD: ms_counter shows the "master" key twice, reason being that the entity (as it is defined in the FGD) uses the Trigger BaseClass and has the "master" key explicitely defined in its properties.
I'm not sure if duplicate keys can cause issues, but it's better to be safe than sorry (so I removed the key definition from my ms1.4.fgd).
Fixed.

MS:C Community said:
And a question: Does the "reqavghp" key work on NPCs?
Eh... Crap, no. Be kind of a pain to implement now, as I'd have to go through the rigmarole of adjusting msmonster_random as well. Dunno if it might be simpler to let you prefix the reqhp property's value with "avg:" or something.

Still hoping to someday work up a new auto-adjust system that scales in and out going damage instead, as some coop RPGs do, and let players of different level ranges work together better. Actually got a formula to work with from a friend working on a retail MMO, but MSC's lack of actual leveling system makes it hard to adapt.
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
Thothie said:
unlocking an trigger_relay
There's no unlocking a trigger_relay because the "master" key doesn't work on it (verified this in a test map a few days ago).

Thothie said:
Dun think you need weather/timer anymore though. The GM fires "mstime_XX" and "hour_counter" every world hour, or should, at least.
With respect, I don't think you understand what the problem is here; the GM fires mstime_n and hour_counter just fine (also verified this) but I have no control whatsoever over these events. They just happen.
In other words: If a player were to use wizardry* to change the time, a certain map event would happen that I wish to have reserved for much later in the map.

An example of this are the wolves in thornlands. Rather than wait until it's
hours, you can just set the time to
and get them to show up. I wish to avoid this.

So my early workaround was weather/timer (so that hour_n would be triggered), an NPC over which I have control (i.e. it spawns when I want to) but my new workaround is much better because it doesn't require this NPC.

Edit: Kind of related, here's another thing I noticed. Not only at Hour N, but also at Hour N:30 does the GM fire mstime_n and hour_counter.
In other words: Both at in-game times 03:00 PM and 03:30 PM, the events mstime_15 and hour_counter are fired! Is this intentional?

*a certain console command
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Oh, yeah, damnitall... Though it would work if you had a brush trigger that activated the mobs (as you should for all mobs, as you don't want them spawning with no players about), and you unlocked that.

Meh, wouldn't be all that much easier to do script side either.

This *might* work...

test_scripts/<mapname>/map_startup.script
Code:
{
	setvarg G_TRACK_DEATHS 1
	setvarg G_TRACK_DEATHS_TRIGGER 100 //or however many dead mobs you require
	setvarg G_TRACK_DEATHS_EVENT gm_map_midnightmash
}

test_scripts/game_master.script
Code:
{ gm_map_midnightmash
	setvard MAP_MIDNIGHTMASH_ENABLE 1
}

{ worldevent_time //<hour>
	if MAP_MIDNIGHTMASH_ENABLE
	if PARAM1 == 0 //or whatever hour you want
	usetrigger spawn_midnight_mobs
	setvard MAP_MIDNIGHTMASH_ENABLE 0
}

Granted, even that, not until after the patch. :\
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
I already found a great workaround though :razz:
I realize my earlier post might have a bit of a tl;dr vibe to it, and I edited my previous post a few times (did you see the bit about thornlands?) but I figured out a method that will most likely work -- will test later.

Still though, thanks for your effort!
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Yeah, although I dun see how the system gets around that "player magic", once the requisite dead mobs are down.

Granted, a simple, really long delayed trigger, might get ya want more reliably without having to worry about player magic, and you could set the weather to night at that moment, via mstrig_weather fog_black (and optionally lock it that way.) Or simply trigger the same sequence with some delay after the requisite mobs are downed.

MS:C community said:
Edit: Kind of related, here's another thing I noticed. Not only at Hour N, but also at Hour N:30 does the GM fire mstime_n and hour_counter.
In other words: Both at in-game times 03:00 PM and 03:30 PM, the events mstime_15 and hour_counter are fired! Is this intentional?
The GM is counting half-hours? :\ No clue what would make it do that. It's using the same gong the rest of the system is using (ie. worldevent_time), so if it's counting halves, then, damn, so is everything else (like, weather and TOD effects). Not been seeing that, I dun think. :/
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
Thothie said:
Yeah, although I dun see how the system gets around that "player magic", once the requisite dead mobs are down.
True, there's still no way around that cons... wizardry, but at least whatever event I have in mind, can't be triggered right from the start of the map. Actual work (in the form of completing the majority of the map) has to be done first.

As for that half-hour thing... I just verified it again.
Method used: A game_text entity named "mstime_9" with message "mstime_9 has been triggered." activates at 09:00 AM and 09:30 AM... Similar entity setup used for hour_counter. Also tried with several other times of day.
And yes, weather changes also occur every half-hour and hour, instead of only every hour. Again verified with a game_text entity (named, for example, "weatherchange_rain").

It's odd.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Greeat... I love finding and tracking down new mystery bugs right after I start assembling the package.

This would be another reason, however, not to rely on the TOD, and to use a delay instead. Not real reliable.
 

MS:C community

Old Skool Apostle
Alpha Tester
Joined
Jul 7, 2011
Messages
504
Reaction score
109
I'm sorry, I didn't mean to waste your time, nor delay the patch.
As far as I'm concerned / as far as I know, this bug isn't critical at all, anyway. So feel free to ignore it, or at least for now.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Meh, I could see where it could cause some issues though. Hrmm...

True, it's not causing a lot, if none of us have noticed it for the past year and half, or however long... >_>
 

TheOysterHippopotami

Active Adventurer
MSS Developer
DarkTide
Joined
Sep 6, 2009
Messages
1,213
Reaction score
42
Age
35
An example of this are the wolves in thornlands. Rather than wait until it's
hours, you can just set the time to
and get them to show up. I wish to avoid this.
Is there some way to ban settime in your maps? I wanted to have this done to some of my maps, eventually, for this exact reason.
 

Thothie

Administrator
Staff member
Administrator
Moderator
MSC Archivist
Joined
Apr 8, 2005
Messages
16,342
Reaction score
326
Location
lost
Dun really recommend having events depending on variables that have nothing to do with the player's actions nor take into account as to where they maybe within the map, but it'd be possible to implement for the script side function. Not sure about the code side TOD vote thingie though. Suspect the main reason it's there is for those pesky Edana shops, secondary reason being some TOD/weather effects not playing nice with some clients, but that's why we have the clearsky command now.

You can, however, effectively lock debilitating darkness (such as fog_black) and other weather/TOD related effects with mstring_weather.
 
Top