Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Smoke39

Pages: 1 ... 13 14 [15] 16 17 ... 21
141
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« 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.

142
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« 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.

143
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« 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().

144
I was in the middle of writing a post about how this didn't feel like it had a place in the game when inspiration struck for a possible solution.  It didn't pan out, but it led me to another idea that I think might work.

Anyway, the idea is that sergeants will drop an "energy adapter" once you get the assault rifle.  This'll give you a way to use the energy cells they drop before you get the pulse rifle, and also give an explanation for why the fuck they shoot red plasma from ordinary rifles.  I'd also change cyborg projectiles to cyan, since they visually have real pulse rifles, so everything would finally be nice and consistent.

145
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« 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.

146
Turok Dinosaur Hunter Modding/Mapping / Re: Smoke's Modding Guide
« 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.

147
Turok Dinosaur Hunter Modding/Mapping / Re: [Release] Turok+ v1.2
« on: February 02, 2017, 10:19:55 PM »
Just updated the OP with a possible fix for some random crashes.  This time the base package has been updated to v1.21.

148
Turok Dinosaur Hunter Modding/Mapping / Re: [Release] Turok+ v1.2
« on: February 02, 2017, 06:23:43 PM »
Just put up a hotfix for a couple of taunts crashing the game.  No version number change -- just redownload from the same link.

149
Turok Dinosaur Hunter Modding/Mapping / Re: [Release] Turok+ v1.2
« on: February 02, 2017, 03:31:26 PM »
New version is up!  Highlights include pistol burst fire upgrade, full-auto AR, pulse rifle beam mode, and a new taunts addon.

Speaking of addons, I've finally reincorporated them into the standalone package.  They were only on the workshop for the past few versions.

150
Do you have an idea what the 'Arg 6 - 1024' on sector properties is a reference to?

If it's not mentioned in the manual or under GetAreaArg/ChangeAreaArg here, then I don't know anything about it.

Having said that, I did a quick search in the manual and found arg 6 mentioned in the lava section as the amount of time between damage.

these root directory folders can be dangerous toward the normal functioning of the game. If 'Set Developer "0"' will they be ignored? I think that's correct.

Yeah.  When dev mode is 0, only game.kpf, and any kpf files in the mods folder will be loaded.  No unpackaged files will be loaded.

Pages: 1 ... 13 14 [15] 16 17 ... 21
SimplePortal 2.3.6 © 2008-2014, SimplePortal