Need Help With Code for a DnD map

  • Thread starter Thread starter 6911750022
  • Start date Start date
6

6911750022

Guest
Hi, I am trying to make a DnD map. The idea is that the Dm's can place units and do pretty much anything to make a quest for the heros who do whatever the Dm wants to make them do.
I have figured out most of the stuff but can't figure out how to make commands like
-size 350
-level 10
and stuff like that. The first one would set the scale of a selected unit and the second one would set the level of the selected unit.
Another one is
-set 1 "name"
-1 "text"

which if you typed
-1 Hello

Would show to everyone else
"name": Hello

It should work with more than one name (at least 3) so the dm could say

-set 1 Good Guy
-set 2 Evil Guy
-set 3 Dm

-1 You must help me (Good Guy: You must help me)
-2 I WILL KILL YOU ALL (Evil Guy: I WILL KILL YOU ALL)

I am having problems seperating the first part from the second one.
Any ideas?

Also how can you give only certain players vision of the map?
The best I can do is disabling the fog of war and black mask but that affects everyone.
I would prefer if the Heros can see the terrain but not the units (they will be in third person) and the dms just see everything.
 
Well, unfortunately, you can't place units or set their scaling factor in game. A solution to plact units would be to create a certain number of units, and then for the DM to move them, he can order them to move to wherever, and using this trigger will move them there instantly.

Code:
Events:
     A unit is issued an order.
Conditions:
     (Owner of (ordered unit)) equal to <DM>
     (Issued order) equal to <move> or (issued order) equal to <smart>
Actions:
     Set <placepoint> equal to 
     Order (ordered unit) to <stop>.
     Move (ordered unit) instantly to <placepoint>.

As for the text thing, it isn't that complicated. First do this:

Code:
Events:
     <DM> enters "-set" as substring.
Conditions:
Actions:
     Set name of Player(Integer(Substring(Entered Chat String, 6, 6))) to Substring(Entered chat string, 8, Length(Entered Chat String)).
     Remove <trigger below> from trigger queue.

Use this to display the text:

Code:
Events:
     Player 1 enters <empty string> as substring.
     Player 2 enters <empty string> as substring.
     ...
Conditions:
Actions:
     Display to <all players> "(Name of (triggering player)) + ": " + (Entered Chat String)".

If you have any other questions just ask. :)
 
Takes note of the text thing :P
The only new part to that to me was the 8, length of text.

You get rep for this one. Silver.
 
By place he does mean create right? Because you can create units in game all you like.

Oh and if your making a DnD game I definately suggest the DM should have a DM unit. It makes it much easier.

He could have a revealed map and an item which ifinate distance that moves a region called spawn to the target. That way you could type -setspawn 8 or something to set the amount of units spawned and -spawn 9 to spawn in a creature which 9 referred to. That method the DM could summon whatever creature he wanted anyway.


Sorry for all the text this topic just sparked my creativity...
 
Thanks for the replies. By place, I meant create under a "spawner" unit. I am sure you can make a -size command because there is one in the map I am basing mine on (too bad it is protected :( ). I should be able to figure it out though because I was only having trouble seperating parts of the message. Il just modify the code a little.
 
I do remeber a topic a while back when some guy wanted his hero to get bigger when he leveled up so I'm sure it's possible.
 
Actually, yes, I apologize. Use the action "Animation - Change Unit Size".

As for placing units in game, I thought you meant drag them around like in WE (sorry; I get a bit confused sometimes... :P ). Kershbob's solution is fine.

I hope that covers everthing. :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    Hey Ghan, whatever cron job its part of its not running its been the same for days. If it does not work can we remove it?
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1

The Helper Discord

Members online

No members online now.

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top