Modify message

Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
Type ot the full word: TUR**:
Finish the word: Turok 2: Seeds of ****:
Finish the word: Turok Dinosaur ******:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Smoke39
« on: September 24, 2017, 02:46:01 AM »

Added some info on player lock as it pertains to cutscenes and weapon state.
Posted by: Smoke39
« on: September 11, 2017, 07:21:05 PM »

Added info on actor initialization to ScriptObject, and info on the persistent bit (mostly in ScriptObject, plus some functions in kActor).
Posted by: Smoke39
« on: June 23, 2017, 07:24:18 PM »

Finally added an explanation of native classes (kex-prefixed), and how they work with internal script classes (k-prefixed) and user scripts (the stuff we can change): https://smoke39.github.io/turok/scripts.html#ControlStructure.  It can be kinda confusing, so I hope I was able to make things a little clearer, rather than even more confusing.

Sometime I'd like to put together a proper reference on actor defs, with info on all the native classes.  Currently you can kinda get a feel for what's delegated to the scripts by looking at the callbacks in ScriptObject, ScriptObjectPlayer, and ScriptObjectWeapon, but I think it'll help people develop an intuition seeing examples of the other side of that -- what's handled natively.
Posted by: raul
« on: May 17, 2017, 11:13:46 PM »

Thank you so much Smoke39, this guide is pretty handy!
Posted by: Gazer
« on: February 14, 2017, 04:23:33 PM »

I figured out the problem, 2 bad models - out of 16 total that I added. Sheesh I'm relieved it's not a bad fix. I say mapping for this thing is a real chore. I guess I'm spoiled from using Radiant in the past. There was a lot of people working on the same thing who generated a lot of solutions to problems. It's astonishing the scripting work you've done Smoke.

Thanks - Gazer
Posted by: Smoke39
« on: February 14, 2017, 01:57:31 PM »

Smoke do you have anything on the hexadecimal codes?

No.  I think that stuff's probably not of any use without a debugger and the game's source.
Posted by: Gazer
« on: February 14, 2017, 01:33:26 PM »

My best guess at this point is the models that I copied and retextured. I'm cognizant of the case sensitivity and I checked everything in that respect. So in testing my models now in controlled conditions I'm getting 'memory could not be read' crash log return. (with developer '0')

Eh - the little done, the vast undone. Gazer

EDIT: Smoke do you have anything on the hexadecimal codes?
Posted by: Smoke39
« on: February 14, 2017, 01:27:50 AM »

My first guess would be inconsistent capitalization somewhere.  As I highlight here, unpackaged file names are not case-sensitive, but files packaged in a kpf are case-sensitive.  E.g., having a file named "Banana.map" referred to as "banana.map" in mapInfo.txt will cause problems.
Posted by: Gazer
« on: February 14, 2017, 01:14:44 AM »

Hey Smoke, Howzit?

Hey I posted my level without custom scripting (besides adding my mapid to the mapInfo.txt), but my level doesn't run without the developer "1" flag. Have you run across any information on what would cause that? I do have models in the game that are hakked and retextured, and then re-deposited into the game. That would be the only thing that could cause a conflict with original files. I haven't noticed any conflict though and no error messages besides game crashes at startup when developer set to "0".

Sobek.exe caused and exception - yata yata - hexadecimal code - hexa - hexa

Thanks - Gazer
Posted by: Gazer
« on: February 10, 2017, 06:39:43 PM »

I've noticed your work Smoke! you Rock! I can't do what you do ... ha ha no way no how. My mind gets all kerplunktuated (void) Kstr #sizzledik -% 420 Lsd @boozer

Thanks - Gazer

I just looked at your examples - I am shocked. You did a lot of work Smoke. If I dig into this I will never finish a single map. I generally have to check each character that I type 3 times for syntax. And I flip letters and numbers sometimes, when I tpye. lol (this php has autocorrect damn i7 chip)
So I'm dumbfounded. Gazer
Posted by: Smoke39
« on: February 10, 2017, 02:43:23 PM »

Near the top of main.txt, after all the #includes, you'll see:

funcdef void VARFUNC(const kStr &in, const kStr &in);

This is defining a function type, named "VARFUNC," which takes two strings as parameters, and has no return type.  This allows us to pass functions of this type as a parameter to other functions.  In this case, Add() and SetValue(), in VarFunctor.  Add() is used to add new variables to GameVariables, and SetValue() is used to change the value of variables already in GameVariables.


In main(), you'll see:

SetStateVars(VARFUNC(functor.Add));

This is calling SetStateVars(), passing the Add() function as a parameter.  This is called once when the game is run, and it registers all the persistent, per-save variables.


In newgame(), you'll see:

SetStateVars(VARFUNC(functor.SetValue));

This is also calling SetStateVars(), but this time passing the SetValue() function as a parameters.  This is called every time the player starts a new game, and it resets all the persistent game variables to their default values.


The purpose of all this function passing malarky is that we can specify all the persistent game variables ONCE in SetStateVars(), rather than having to have two copies for adding and setting.

THE BOTTOM LINE is, to add your own persistent, per-save variables, just add them to either SetStateVars(), or InitCustomStateVars() (or even in a new function, and call it from SetStateVars(), however you wanna organize it).  Just use:

setFunc( "var name", "initial value" );

and it'll ADD or UPDATE your new variables, whichever is appropriate.

You can see examples of this in Turok+, where I've added a bunch of my own variables at the end of InitCustomStateVars().
Posted by: Gazer
« on: February 10, 2017, 05:26:43 AM »

lol at Dinomite - you should just learn a simple modeling proggie. You could be the resident modelersaurus.

Hey Smoke, how about you help me with a couple of scripts? I am bad at understanding the structure of them in general. Then when I do 'get it' I will forget again in like 30 seconds afterward.

In the 'scripts' folder in the 'main.txt' file there's an area for 'once-only' -  'GameVariables' and other simple scripts that reference main scripts in the engine. I'd like to utilize this in my mapfile but I can't understand the reference to (VARFUNC(functor.Add)); I tried checking the Angelscript forums but I don't have the time to learn it from scratch. As I noted earlier, I'm bad with basic programming syntax in general anyway.

So do you understand 'InitCustomStateVars' and 'SetStateVars' and how to add them to 'main.txt'? I just want to add particularly 1 item to my level.
Thanks, Gazer
Posted by: Mon-Ark
« on: February 04, 2017, 01:50:25 PM »

well, you can make animations with 3d modelling programs already, so theres not much need for the editor to have that. What I dont know is if the editor allows to import models and animation into wathever format the kex engine works.

If this were the case, then making it work is something that could to be done on the scripting side.
Posted by: Smoke39
« on: February 03, 2017, 09:46:33 PM »

Someone else would have to get the models into the game, and I'm not sure anything with moving parts could be animated properly right now.  I could probably script them, though some details might not be doable.  I haven't quite managed to make a properly functioning scope, for example.
Posted by: Smoke39
« on: February 03, 2017, 06:25:54 PM »

Got a start on the Levels section.  There's not much there yet, but the little bit that is there should still be useful.
SimplePortal 2.3.6 © 2008-2014, SimplePortal