A new Trespasser patch/update (Trespasser CE)

Discuss the game Trespasser here!

Moderators: TresCom Support Team, TresCom Board Managers

User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by machf »

Draconisaurus wrote:Well my original tests were exclusive to a specific, massive, distant pyramid, in part because that was the object I wanted to not be a sprite from the entrance to its valley. I gave up and later visited a crevice full of crystals and the low settings I'd left on were extremely evident, as most were sprites even a few feet away. So basically the only actual issue seems to be this massive distant object thing. I'm not sure what can be done to fix it.
Uh... ever thought of adding "bool NoCache = true" to that pyramid's t-script?
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
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14045
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by Draconisaurus »

Uhhh. It seems I should have, that fixed it, thanks.
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

Draconisaurus wrote:Also we were having serious trouble getting anything in the squirrel code to work, even from our resident expertish programmer. They were able to get a rudimentary understanding of what it was supposed to do but little to no success in execution. Would be nice to have some sort of primer and maybe some additional working examples.
I'm afraid that writing all-encompassing documentation and samples is much too time consuming. For squirrel language specific documentation and tutorials I have to refer to google (also the squirrel homepage http://www.squirrel-lang.org, then there are a few games that used squirrel like Portal 2 that may have squirrel related documentation and scripts to look at). For things that aren't related to the language/scripting but the way the engine/game works, there's the source.

However, it's usually far less time consuming to answer/help with specific questions/situations. If there's some particular functionality or function you want to ask about, or have a script that doesn't work that you want to me look at or even write some example code snippet to that does a specific thing, then just go ahead and ask. I'll do my best to help with such things.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by machf »

Lee, on a somewhat different note - have you thought of improving Trespasser's trigger functionality? I've been testing triggers to try something during the past few days, and found out they're very limited - but there's room for improvement. I won't get into specifics here - unless you ask me to.
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
Draconisaurus
T-Rex Killer
T-Rex Killer
Posts: 14045
Joined: Mon Dec 06, 2004 5:21 pm
Antispam: No
Location: Isla Sorna
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by Draconisaurus »

I must point to this thread: viewtopic.php?f=6&t=11129
TheIdiot wrote: and so far I haven't succeeded in anything other than understanding how the new example Spitter script works - I was able to get the TC~Isle dilos spitting again, all you have to do is add 1 line in the T-scripts for the dilo and the spit. I'm curious if anyone else has dabbled in this and come up with anything? There are example scripts provided for a HUD and a Map function as well, but I haven't figured those out whatsoever.
..
Slugger wrote:So I can't seem to get my version of TresCE to load or run any .nut script (pretty sure I'm running the latest version which supports it). I placed .nut files inside the follow directories:

c:\tres cd\scripts & c:\tres cd\Scripts
c:\tres cd\data\scripts & c:\tres cd\data\Scripts
c:\Program Files\DWI\Tres\scripts & c:\Program Files\DWI\Tres\Scripts

I've tried a simple script to just print out to the debug log and the HUD script, neither of which seem to work.

Perplexing, this is...
..Ultimately all anyone ever got to work was the spitter. We're stuck.
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by machf »

Draconisaurus wrote:
..Ultimately all anyone ever got to work was the spitter. We're stuck.
Well, I must say *I* haven't looked at it yet... and not sure who else hasn't, either. Only a handful of people have so far attempted anyrthing.
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
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

For initial setup to do scripting work, the first recommended steps would be to enable the debug log window, up the verbosity level of debug output and enable script reloading. That's done by setting the following values in the "[Debug]" section of "trespasser.ini":

Code: Select all

SysLog=2
LogDevInfo=4
ReloadScripts=1
(a higher number than 4 for LogDevInfo is also fine)

and in the "[General]" section also set the following (so that "ReloadScripts" works properly):

Code: Select all

DisableSimpleLevelRestart=True
Then I'd also suggest running the game in windowed mode, with a lower resolution than the desktop, so that you can see the log window while playing and also making it quick and easy to tab back and forth.

Now on to get some simple test script running. Create a "scripts" directory either in the game root or inside a directory that you've listed in "ModPaths" in "tp_mod.ini". If you have an "ActiveFM" specified, then you can also create "scripts" in the directory of that.

In that scripts directory now create a file named for example "helloworld.nut" and paste the following sample script:

Code: Select all

class HellowWorldGS extends GameScript
{
	function OnScriptInit(bSaveGame)
	{
		print("HelloWorld OnScriptInit(" + bSaveGame + ")");
	}

	// called when a new campaign starts (shortly before the level start trigger executes)
	// (using the developer level direct-load screen also counts as a new campaign)
	function OnGameStart()
	{
		print("HelloWorld OnGameStart");
		print("    first level = " + TP_Engine.GetCurrentLevel());
	}

	// called at the start of a level, i.e. when a level is NOT loaded from a savegame (immediately after the level start trigger)
	function OnLevelStart()
	{
		print("HelloWorld OnLevelStart");
		print("    level = " + TP_Engine.GetCurrentLevel());
	}

	// called when a level ends (the game will stop the sim immediately after this returns, or if it ends due to completing the game
	// OnGameCompleted() will be called first as well)
	// bTransitioningToNewLevel is true if the campaign will continue on to load a next level
	function OnLevelEnd(bTransitioningToNewLevel)
	{
		print("HelloWorld OnLevelEnd(" + bTransitioningToNewLevel + ")");
		if (bTransitioningToNewLevel)
			print("    next level = " + TP_Engine.GetNextLevel());
	}
}
That's it. Now you should be able to start the game and start any level (preferably not a savegame), and you should see a couple of the "HelloWorld" messages in the log window.

Now you could start playing around in the script, save the file and just restart the level or game to make the script get reloaded. Always keeping an eye on the log window for script errors.
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

As far as stamina specifically, and controlling jump, IIRC that wouldn't currently be possible. There are functions to disable movement or head rotation (mouse look) of the player, but not jumping. It might be something that could be added.
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

(double post)
Last edited by Lee Arbuco on Tue Jan 23, 2018 10:05 pm, edited 1 time in total.
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

machf wrote:have you thought of improving Trespasser's trigger functionality? I've been testing triggers to try something during the past few days, and found out they're very limited - but there's room for improvement. I won't get into specifics here - unless you ask me to.
Can't say it's something I've thought about. What kind of functionality are you looking for? Maybe something that could (now or with some future additions) be achieved with squirrel scripting.
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: A new Trespasser patch/update (Trespasser CE)

Post by Draconisaurus »

We do a lot more with some of the advanced value-table scripting options than the devs got into. It's evident that certain script cases were not debugged and so have little glitches. The only one which comes to mind that I'd like to see fixed is that a CCreatureTrigger, despite the values being present for the class, doesn't seem to actually be capable of only firing when all listed CAnimals have died ( http://www.trescom.org/files/docs/tscri ... ureTrigger ).
User avatar
machf
T-Rex Killer
T-Rex Killer
Posts: 12368
Joined: Thu Apr 24, 2003 11:20 pm
Location: Lima, Peru
Contact:

Re: A new Trespasser patch/update (Trespasser CE)

Post by machf »

Draconisaurus wrote:We do a lot more with some of the advanced value-table scripting options than the devs got into. It's evident that certain script cases were not debugged and so have little glitches. The only one which comes to mind that I'd like to see fixed is that a CCreatureTrigger, despite the values being present for the class, doesn't seem to actually be capable of only firing when all listed CAnimals have died ( http://www.trescom.org/files/docs/tscri ... ureTrigger ).
I didn't say "fixing", I said "improving".
Lee Arbuco wrote: Can't say it's something I've thought about. What kind of functionality are you looking for? Maybe something that could (now or with some future additions) be achieved with squirrel scripting.
Take for example the Location triggers. You can use them to find out if the player, a creature (which I guess means either a dinosaur or the player, but I'm not sure of the latter) or an object (which means: anything) has (currently or sometime in the past) entered, left or is staying inside a given volume (which can have the shape of either a sphere or a box whose sides need not be the same length). Sounds fine... most of the time.

When checking for objects, you can use string TriggerActivate = "objectname" to refer to a specific object. But if you want to check if more than one object is inside/has entered/has left the volume, you need to have more than one trigger (one for each object, covering the same volume). It gets cluttered with overlapping triggers after a while. It would be great if you could alternatively use a list like the Creature triggers do, using string A00 = "object00" , string A01 = "object01" , etc. for an unspecified number of objects, and bool EvaluateAll = true meaning "all objects listed" or bool EvaluateAll = false meaning "any object listed".

That's one example of what I mean. There are a few more, but as I said, I won't get into the specifics on this topic unless you want me to.
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
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

Draconisaurus wrote:The only one which comes to mind that I'd like to see fixed is that a CCreatureTrigger, despite the values being present for the class, doesn't seem to actually be capable of only firing when all listed CAnimals have died
Fixing/changing the code wouldn't be much of a problem, but since there is a place in the original levels where a creature trigger has EvaluateAll set to true, it means that a code fix would make that level to behave differently. I'm not up to speed enough to determine from the t-script if they thought that EvaluateAll would require all to be dead, or if that trigger was setup well knowing that it wouldn't.

The thing is that as far as I can see, you can have working EvaluateAll through a workaround. If you create CBooleanTrigger with

string FireExpression = "@YourTrigCreature-00"

then that boolean trigger should in theory trigger only once all creatures in the creature trigger are dead. Did they do that intentionally or not.
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: A new Trespasser patch/update (Trespasser CE)

Post by Draconisaurus »

Tres has tons of work arounds of course. Off the top of my head I don't know any situations currently out of reach of possible scripting.
Lee Arbuco
Parasaurolophus
Parasaurolophus
Posts: 271
Joined: Tue Aug 05, 2014 7:09 pm

Re: A new Trespasser patch/update (Trespasser CE)

Post by Lee Arbuco »

I've added support for (squirrel) script extended trigger scripts that can supply a function that can prevent a trigger from firing. This provides a point for custom logic, for more intricate control of when a trigger can fire, in addition to the standard fire logic that still also applies.

Before I post the updated build I'd still like some input on whether or not to change/fix EvaluateAll behavior in creature trigger, because fixed behavior will change how it works in the original level that uses it. For the better or worse, I don't know.

The original trigger is in IJ, and has the T-script:

Code: Select all

group TrigWaveTwo-00 = {
    string Class = "CCreatureTrigger"
    string A00 = "RaptorB300-00"
    string A01 = "RaptorB300-01"
    string A02 = "Albertasaur300-00"
    bool EvaluateAll = true
    int FireCount = 1
    bool CreatureDie = true
    group Action00 = {
        int ActionType = 18
        string ObjectName = "RaptorB300-02"
        string TeleportDestObjectName = "TeleportDestWave2Rap-01"
        bool SetPosition = true
        bool SetOrientation = true
    }
    group Action01 = {
        int ActionType = 18
        string ObjectName = "RaptorB300-03"
        string TeleportDestObjectName = "TeleportDestWave2Rap-00"
        bool SetPosition = true
        bool SetOrientation = true
    }
    group Action02 = {
        int ActionType = 9
        string Target = "RaptorB300-02"
        string StayNearTarget = "Anchor_WaveTwo-00"
        float StayNearMax = 25.000000
        float StayNearOK = 15.000000
        string StayAwayTarget = "RaptorB300-01"
        float StayAwayMin = 17.500000
        float StayAwayOK = 25.000000
    }
    group Action02 = {
        int ActionType = 9
        string Target = "RaptorB300-03"
        string StayNearTarget = "Anchor_WaveTwo-00"
        float StayNearMax = 25.000000
        float StayNearOK = 15.000000
        string StayAwayTarget = "RaptorB300-01"
        float StayAwayMin = 17.500000
        float StayAwayOK = 25.000000
    }
}
So the current/original behavior I take is that it will teleport in two raptors as soon as any of the three listed dinos are killed. The "fixed" behavior would be that all three have to be killed before the two raptors are teleported. Regardless of original intent, those familiar enough might be able to weigh in on which behavior seems more "fun" for how the game actually turned out (the original or a potential fixed one).
Post Reply