TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Creating new content for Trespasser!

Moderators: TresCom Support Team, TresCom Board Managers, TresCom Developers

Post Reply
User avatar
TrespasserGuy
Parasaurolophus
Parasaurolophus
Posts: 359
Joined: Sun Mar 08, 2015 9:54 pm
Location: North America

TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by TrespasserGuy »

When creating a level for people to play, one of the keys to making the level a success is the replay value of it. One way to increase replay value is to have different locations for objects every time you replay the level. Since there will be different areas to look for the said object, it increases replay value!

Hey everybody, it's TrespasserGuy here with a new, foolproof way to randomize the location of a certain object in Tres.

Here's how it works...

Image

A crate is placed high above this contraption you see here. Before the level is loaded, the crate is set to be frozen until a trigger unfreezes it. I got this idea from JPDS. :wink: Anyway, once the level loads, a CStartTrigger will unfreeze the crate, making it fall down onto the contraption. Since Trespasser has physics that nearly mirror the real world, when the crate hits the fork made by the fences, gravity will decide which trigger it will enter. Depending on what trigger the crate enters, the object will be teleported to a different area everytime the level is relaunched.

Image

Don't worry if the crate gets stuck in the middle of the fork. The object will already be placed in a default area in the level's playing area, so if the crate does get stuck, the object will stay in the default area with no problem, but the crate seldom gets stuck so it's fine.

What do you think? Is this a cool way to make replay value into a Tres level? If you want more replay value, you can always add more forks along the way to make more outcomes possible.
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by TheIdiot »

Haha, reminds me of Plinko from The Price is Right. :D

Image

While that is a rather clever way to randomize a trigger, you can also set such a thing up by having a CStartTrigger using ProcessStyle = 2 and FireCount = 1. This would cause the trigger to randomly pick any of the Action## groups when the game starts and execute that action. It also allows you to have more outcomes than only two.

I would however like to see this done in an actual level...maybe you could use it for a sort of mini-game or something.

There's also ATX's Randomized Instance Teleport function where you input a series of coordinates for a set object to use every time the level loads.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by machf »

You know triggers can fire on random probabilities, right?

Still, it's fun, physics-wise speaking. Why don't you expand it into a galton-board?

https://de.wikipedia.org/wiki/Galtonbrett

https://en.wikipedia.org/wiki/Bean_machine

http://mathworld.wolfram.com/GaltonBoard.html
Visit The Carnivores Saga - a forum devoted to modding Action Forms' Carnivores, Carnivores 2 and Carnivores: Ice Age games
Tres WIP: updated T-Script Reference and File Formats documents
Sound name listings for the Demo (build 117), Retail (build 116), Beta 103, Beta 99, Beta 97, Beta 96, Build 55, PC Gamer Alpha (build 32) and E3 1998 Alpha (build 22) TPA files
User avatar
TrespasserGuy
Parasaurolophus
Parasaurolophus
Posts: 359
Joined: Sun Mar 08, 2015 9:54 pm
Location: North America

Re: TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by TrespasserGuy »

TheIdiot wrote:
While that is a rather clever way to randomize a trigger, you can also set such a thing up by having a CStartTrigger using ProcessStyle = 2 and FireCount = 1. This would cause the trigger to randomly pick any of the Action## groups when the game starts and execute that action. It also allows you to have more outcomes than only two.

I would however like to see this done in an actual level...maybe you could use it for a sort of mini-game or something.

There's also ATX's Randomized Instance Teleport function where you input a series of coordinates for a set object to use every time the level loads.
Huh, I guess I'll try out the ProcessStyle and FireCount variables in a different trigger
as for using my device in a an actual level, I'm planning it in using it in my new level right now. I might reveal what I've been working on later on.
I already knew about the ATX mod's teleport function, but I wanted this to be used for any version of Tres.
machf wrote:You know triggers can fire on random probabilities, right?

Still, it's fun, physics-wise speaking. Why don't you expand it into a galton-board?

https://de.wikipedia.org/wiki/Galtonbrett

https://en.wikipedia.org/wiki/Bean_machine

http://mathworld.wolfram.com/GaltonBoard.html
Huh, I'll try making that. It'd be fun making it out of vanilla Tres items, like using a rebar for the pegs and the basketball as the beans.
User avatar
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14045
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by Draconisaurus »

Neat set-up! I am liking it more than the other repliers here seem to... The probability trigger is more of a "this one event has a %## chance of happening", where as the set-up shown above is based on the idea of "which option will happen?"
I want to note that the randomized action exectution order might in fact be pre-determined... That is, random to a degree, but repeating the same random sequence over and over (don't recall what causes it to start-over). I sort of recall Big Red talking about this in his reasoning for implementing the randomized instance feature... Right, he created a new type of random-number-fetcher for ATX since the one in Tres has the repeat flaw. This is testable of course, if you know what all to do.

Also wanted to note - the JPDS crate trigger stuff you found was an idea taken from TptDac, from his level The Four Towers :) It has also been posted about in the forums (years ago) as the primary method for accomplishing certain things script-wise. IIIII don't remember seeing it used outside those two mods however... Mmmm actually I made one or two others which used it (including K~OS1, for the jeep stuff). 'Tis a shame the instance randomizer from ATX was not put in CE... Interested to see the more complex version machf posted put to work!
Just a note - if you start having any problems with the event not happening, it could be from CStartTrigger being used. It doesn't always behave as expected in my experience.
User avatar
TheIdiot
T-Rex
T-Rex
Posts: 4345
Joined: Thu Feb 20, 2014 9:13 pm
Location: Canada, eh?

Re: TG's Amazing Wonderful Object Randomizer-o-rama!! ™

Post by TheIdiot »

Neat set-up! I am liking it more than the other repliers here seem to...
Hey, I think it's pretty cool! Just a bit elaborate of a set-up compared to scripting a trigger in my opinion. It's cool to see something like this in action since the good parts of Tres physics never get much love.
I want to note that the randomized action exectution order might in fact be pre-determined... That is, random to a degree, but repeating the same random sequence over and over (don't recall what causes it to start-over). I sort of recall Big Red talking about this in his reasoning for implementing the randomized instance feature... Right, he created a new type of random-number-fetcher for ATX since the one in Tres has the repeat flaw. This is testable of course, if you know what all to do.
I had a feeling this might be the case since in my own testing I started to notice a pattern to the random order. The thing is that sometimes it changes which Action fires first, but after that it will always repeat the same sequence, even if the first Action is different. Or something like that.
IIIII don't remember seeing it used outside those two mods however...
I used it to make the fence lights work correctly when you turn the power on and off in the old RTJP, but I guess that doesn't really count since it wasn't finished. :?
Post Reply