Jump to content

Map Scripting: Adding "randomness" to Skirmish maps


wowgetoffyourcellphone
 Share

Recommended Posts

Hi y'all. For my latest iterations of the Cycladic Archipelago skirmish map in Delenda Est I've created a new treasure called, "The Argo", which is a shipwreck that gives a lot of Wood, Glory, and Coin loot. I'd like to make it show up randomly at 4 different points on the map or not at all. So, 20% chance at points A, B, C, and D, and 20% chance at no points. As I've modded a script (used on the gallic_fields_3p map in base game) for the Miletus Peninsula skirmish map to send pirate ships into your shipping lanes every X minutes, I hope this treasure placing idea is possible with scripting too. 

ohFJkOK.png

RlbcbQr.png

R1psy4X.png

ld0sLyq.png

 

Anyone have any insights or want to help me with this? 

  • Like 2
Link to comment
Share on other sites

23 minutes ago, sternstaub said:

If randomness is not allowed in the simulation (-> deterministic), i think it must be done in the lobby? Not sure, but Petra AI behaviour can be set to random aswell.

"Random" is of course deterministic, not "truly" random, but to the end-player it appears random even if the sequence starts over after 78612 iterations. Hell, it'll appear random even if there are only 10 iterations.

But back to the script, you can make objects appear at random locations by using the TriggerPoint objects in Atlas. It's already done on the Gallic Fields map. Just looking to make a script do something similar to that map, but just place an object 'Randomly' at one of 4 TriggerPoints. 

Link to comment
Share on other sites

as I side note, I truly loved how Imperivm editor worked, it was one of the very best. you could put down a lot of units, adjust them as will, and set them "unspawned", just to spawn them when scripted.

from the editor you could also add units to groups, or give them names, both accessible from scripts.

Edited by alre
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...