Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 10:36 pm
All times are UTC + 0
Random Wave Delay Trigger Research.
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
EricAnimeFreak
Tiberian Fiend


Joined: 14 Sep 2009
Location: USA New England

PostPosted: Mon Sep 14, 2009 1:29 am    Post subject:  Random Wave Delay Trigger Research.
Subject description: Question and research, or perhaps buried tressure.
Reply with quote  Mark this post and the followings unread

Hey, this is my first post here. Although I just posted this on Den Games Network Site, and I hope to get a reply somewhere, orperhaps I am sharing the goodness. Anyways, I've been looking for research on FA2 random wave delay triggers. I went to quite a few different cnc forums looking for information. And yes, I coined the term, random wave delay, and I will explain it very soon.

I make survival maps online, and one of the problems is they become very boring, so I try to follow these six rules when I make a survival map.

1. Reduce Lag.
a. New economy system of some sort. NEVER EVER give them infinite money!!!!!
b. Overpowered enemy units.
c. Super healing enemy units.
d. Enemies immune to your default tactics.
e. More small waves with power.
2. Randomness.
a. Random delays through triggers, map is never quite the same twice.
b. Different types of units to make a player constantly change his tactics.
3. Waves but within confines of rule 1.
a. Waves should never exceed over 50 units or 75 infantry.
b. Keep waves simply, but make them unique and plentiful.
4. Increased difficulty, staying within rule 1, rule 2, and rule 3.
a. If it's done right, even the map maker should only beat his own map with help 10% of the time, otherwise it's way too easy.
b. Lets not kill people, I mean, make them quit because the lag is just unbearable.
5. FUN - It has to be fun, not a boring lag fest filled with repetiveness.
a. Self Explantory.
6. BALANCED AND PLAYTESTED - Make sure it works, listen to your critics, and make sure it's balanced.
a. Balancing so its fair and just for everyone.
b. Change things if everyone hates it, unless it breaks balance.

Now for a few years I had thought, wouldn't it be nice if random waves showed up, that didn't show up the last time I played this map. Making the map feel completly different from the last time I played it, or at the very least make it a unique experince each time I played it.

Then I came up with random wave delay triggers, and of course I tried looking for anyone elses thoughts on this subject, but alas had to go it alone.

So what is it?
Below:

Now first we create a primary Triger to set the interval of all wave triggers. Then we will set it to a repeating trigger. Next we will set the event type to Elasped Time = 600. Now we will create X actions, where X = the amount of waves we would like on our map, lets make it 2. So we will set the first action to enable trigger wave1, and then the second action to enable trigger wave2.
Now we make the wave by creating a new repaeating trigger called wave1. Have this wave disabled. Next under event we will create a Random Delay of 1000. Finnally we will create the action, which is our wave/waves. Now we will repeat the process excatly the same for wave 2 as wave 1 accept, we will set it with a random delay of 600.

What will result is this. Every 600 seconds, the primary trigger will restart the wave triggers timers. Each time the wave triggers timers restart, they will have another chance at spawning a wave.

The Math:
If the game is a survival set to a "announce win" after 3600 seconds(1 hour) then a wave will get 5 chances each to land on a special chance number to generate a wave. For instance, wave 1 can spawn randomly between 500 and 1500 seconds. This means that it overlaps for 100 seconds before it would be reset. So 100 divided by 1000 seconds equals .1, which gives it a 10% chance of spawning each time. Since it is given 5 cahnces to get this magical set number, it now has a 50% chance of showing up in game. Now realistically you would actully want lower percent chances the more waves you had, but this is left up to the map maker.

The second wave is set for a 600 second delay, which means it will overlap by 300. So 300 dived by 600 = 50% chance, which is then multiplied by 5 equaling 250% chance of showing up everygame

Basically, it's a random wave delay generator. With a 600 elapsed time primary trigger for your waves. You can choose for your wave to have any (% Chance) you want, from 0%(Wave delay 1201+) to 100%(Wave delay 300-).

Now you could make a bunch of waves, never expect to see them because thier probaility is so low. But once and awhile you get a few, making the map unique whenever you play it. I have a survival map, which I have been testing this on for a while now and it works. But Before I try and dedicate a map entirely made up of random wave delay triggers, I'd like some higher knowledged modders to give me there words of advice/wisdom.

Now my question is this, is this a wide know secret that know one is telling, did I actully originally think this up? I have been modding for years I guess, but only map mods though. Perhaps this is just considered useless info that everyone knows, and isn't helpful. And the reason i joined 3 years ago was becaus ei had a question on modding, but I never got to asking it, figure i'd piss somone off at the forum, instead I just kept lurking around sites, and ussing trial and error on all my ini codes, triggers, scripts, and etc.

Back to top
View user's profile Send private message Visit poster's website
EricAnimeFreak
Tiberian Fiend


Joined: 14 Sep 2009
Location: USA New England

PostPosted: Tue Sep 15, 2009 6:18 am    Post subject: Additional Info Reply with quote  Mark this post and the followings unread

I set out to generate completely random waves to the eyes of the beholder, ussing a very exact combination of triggers ussing probability. I have tested it, and the theory seems sound. But having others in the field look at it is very helpful. This is an update to help further explain excatly what it is I am saying.

As for the math, I think it is accurate, so long as cnc ra2 Yuri engine can actually do what it is suppose to do. A Random Delay trigger delays a random time between 50 and 150 percent of time specified. For instance: If I set it to 10, it would randomly pick a number between 5 and 15.

This is Explained better below, but this is a nice simple chart:
There are 4 Parts to a random wave delay Trigger:
1. Control-Elapsed repeating time trigger.
2. Experiment-Random Delay/random wave
3. Data set-Map duration minus control time = X, then X divided by control = Y.
4. Result-Y multiplied by (Chance of random wave) = % Chance of wave occuring each game.

Ok, we have a trigger Called A, it is a repeating trigger. Every 600 seconds, Triger A enables Trigger B and Trigger C. When this happens, the timer on Trigger B and C resets. Trigger B and Trigger C are also set to be repeating triggers. When Trigger A fires and enables Trigger B and C, thier timer resets, this continues to repeat untill the game is over, or you use a Trigger that Destroys all Random Wave Delay triggers.

So we can now say that, Trigger B and C will automatically reset every 600 seconds.

If Trigger B is set to RandomDelay=1000, then the computer will randomly pick a number between 500 and 1500. (500,501,503,etc,1499,1500)
This gives us 1000 possible outcomes of random numbers. However, the timer will auto reset because of Trigger A every 600 seconds. This means that if the computer rolls any values over 600 the wave will not fire.
So that still means that 100 of the 1000 possible outcomes can still fire a wave. This means we have a 10% probability that the wave will fire whenever the cycle repeats.

If the map lasts for 600 seconds, then the wave will never fire, the first 600 countdown is a primer. So if we make a map that ends after 3600 seconds, and subtract the intail 600 second primer we are left with 5 chances at rolling this wave. Each wave has a 10% cahnce of firing.
However, if you just wan't to know the percent that it will fire at least 1 time in game, you get a 50% chance that it will fire at least one time in game. This means chance wise, every other game you play will spawn 1 wave.

I hope this update, helps people to understand what I'm trying to do. Maybe this has been insightful to some people, or perhaps it opens up soemthing no oen has thought before. The latter I doubt, but I think it should still be intresting to alot of people.

Back to top
View user's profile Send private message Visit poster's website
Blade
Cyborg Commando


Joined: 23 Dec 2003

PostPosted: Tue Sep 15, 2009 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Kind of reminds me of the logic in "Eintein's Dice Roll" (IIRC) by Wildfire which made use of the random delay trigger. Never played the map myself but reading the description of how it worked used similar ideas to this I think.

Back to top
View user's profile Send private message
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Wed Sep 16, 2009 12:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Interesting for both multiplayer and singleplayer maps.
But there isn't much way to effect the difficulty here, is there? (I mean, there is an pretty equal chance of it being really easy through to really hard, and no way to change the game if you want a bigger challenge)

Back to top
View user's profile Send private message
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Wed Sep 16, 2009 2:24 am    Post subject: Reply with quote  Mark this post and the followings unread

Good info here.

I've done some random stuff with my tiberian Odyssey map "safe Haven"

I'd have 3 daisty-chained looping triggers, each would set its own local and clear the last one's local, after a random delay.

Then I made another random delay that would spawn either a small visceroid, large visceroid, or floater depending on which local was currently se by the 3 looping triggers.

I think we should move this to research

_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
EricAnimeFreak
Tiberian Fiend


Joined: 14 Sep 2009
Location: USA New England

PostPosted: Wed Sep 16, 2009 4:07 am    Post subject: Reply Reply with quote  Mark this post and the followings unread

Blade, I looked at Eiensteins Dice Roll, it does use random delays, but it's like Team Black's Local and Clear triggers. (I never really understood local/clear set triggers that much by the way, figured out everything by msyelf over the years. They were never a priority for me.) If you feel this is considered research go ahead and move it, I almost thought it was almost like a tutorial, I thought I was pretty descriptive. LOL

Orac, Nah the possbilties are endless if you can create probability, basically it's like recreating an ai mind. Mind you the coding for this to make an effective map, would be imposibly long. Not to mention with proability, there is a chance of creating something that is winnable 1 second and the next time is not. But basically you could set the game to gradually get harder, and have random wave types appear. This throws a palyer off and can cost him, random bunch up of waves can also randomly happen. Well controlling difficulty vs. controlling intelligence is of coure a completely different subject...

Anyways, yes you can effect difficulty, or at least I think you can. I've uploaded my first map on PPM and it has some random wave delay triggers in it, if you want to be a gueinea pig, go try it. I hope soon though to eventually create a map entirely out of random wave delay's for testing purposes. Of course the first map to have the triggers was my Trench Survival Mod. http://www.ppmsite.com/forum/viewtopic.php?t=25014 But it is not a map based on them, it just tested them a bit for my first research.

Also is there a better name for this trigger combinatio/setup besides Random Wave Delays. The keys are, it creates a chance of a wave appearing, and can create the effect that each time you play the map it feels differnt because the waves might change. It's like a random wave generator. Think about it.

Back to top
View user's profile Send private message Visit poster's website
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Teamblackistan Posts: Over 9000

PostPosted: Wed Sep 16, 2009 10:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

Locals are pretty useful, I'd highly suggest using them.

They're like bookmarks, which are either "set" (0) or "clear" (1)

The action of setting or clearing a local can be the event or actin of a trigger..

So you could have a trigger set a local, and every trigger that has "local is set.." of that local will fire.

_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department. Discord
The Team Black Index

Back to top
View user's profile Send private message
EricAnimeFreak
Tiberian Fiend


Joined: 14 Sep 2009
Location: USA New England

PostPosted: Fri Sep 18, 2009 4:13 am    Post subject: research Reply with quote  Mark this post and the followings unread

Well I've been doing more research. I've found threw testing that if you set to many triggers to one primary trigger it can cause and AI error. Also varying your times and delays are also necessary. As for my map on other thread, I think I've finnaly got it fixed, it was my triggers I think, too many spawning around the same time. So my map has had an upgrade to fix this which I will update.

I wrote out this chart to help other people try and write out thier own waves if they want to try it. This is how you generate your percents, feel free to use this primitive chart. Although making your own values is easily achieved. To avoid errors, don't put more then 5 waves on a primary random wave delay trigger generator. And each random delay wave should have its own unique random delay #.

-------------------------------------------------------

Map Length=M
3600

Primary=Elapsed time of Repeating trigger.

Wave Occurence=Y
(M/Primary)-2=Y

The first -1 is to enable trigger, second -1 is impossible becaus eit could spawn seconds before game ends, which is useless.

Try=Probability overlap to be divided by Wave Length.

WaveLength=Z
Random Delay set on repaeting wave trigger.

-------------------------------------------------------

Mathematical Possibilities (From 200%, to 100%, to 50%, to 0%)

Primary=600
300 - 600 - 900 - 1200

Primary=720
360 - 720 - 1080 - 1440

Primary=900
450 - 900 - 1350 - 1800

Primary=1200
600 - 1200 - 1800 - 2400

Primary=1800
900 - 1800 - 2700 - 3600

-------------------------------------------------------

Primary=600

Y=4

600=Try100 Z=1000 = 10%X4=%40

600=Try75 Z=1050 = 7%X4=28%

600=Try50 Z=1100 = 4.5%x4=18%

600=Try25 Z=1150 = 2%X4=8%

600=Try12.5 Z=1175 = 1%X4=4%

-------------------------------------------------------

Primary=720

Y=3

720=Try100 Z=1240 = 8%X3=24%

720=Try75 Z=1290 = 6%X3=18%

720=Try50 Z=1340 = 4%X3=12%

720=Try25 Z=1390 = 2%X3=6%

720=Try12.5 Z=1415 = 1%X3=3%

-------------------------------------------------------

Primary=900

Y=2

900=Try100 Z=1600 = 6.25%X2=12.5%

900=Try75 Z=1650 = 4%X2=8%

900=Try50 Z=1700 = 3%X2=6%

900=Try25 Z=1750 = 1.5%x2=3%

900=Try12.5 Z=1775 = 0.7%X2=1.5%

-------------------------------------------------------

Primary=1200

Y=1

1200=Try200 Z=2000 = 10%X1=10%

1200=Try100 Z=2200 = 4.5%X1=4.5%

1200=Try75 Z=2250 = 3.33%X1=3.33%

1200=Try50 Z=2300 = 2%X1=2%

-------------------------------------------------------

Enjoy, and let the research continue I guess, I'm starting to think, this can't accurately produce random waves, but more likely, random difficulty. Anyone elses thoughts?

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1965s ][ Queries: 11 (0.0071s) ][ Debug on ]