Archetypes are your friend, if you want people to be able to adjust things in the editor. Jeff's post with the UDN document is also very, very handy.
If you must use INI files, you can "globalconfig" your vars, and use the "set (classname) (varname) (value)" console command to tweak them in game, then adjust them outside of game.
Of course, this leads to very easy hacking by nosy players.
But your variable doesn't need to be global, it's only used by the camera. It should therefore probably be in the PlayerController class (or the Camera class if you're doing your camera system that way), or possible the GameInfo, or MapInfo if it changes per map. Wherever you put it, you can edit it in-game using the methods given above.
I am aware of the "placeable" keyword, and I know that it is easy to set it up for LDs to modify the variables of an instance of an object that they've placed in the map. This is a different situation.
I realize that unrealscript doesn't have "global" variables, but what I'm talking about is basically the equivalent of that. For instance, our game is an isometric camera dungeon crawler game. It has a camera with a constant height and angle, but I want the LDs to be able to easily tweak these values until they find the look that they like. This is not a placeable object. It's more like the c++ equivalent of a global const variable, in a way. Once they've decided that they all like how it looks, the values will be set in stone and never touched again.
Excellent update, Jeff! (i do wish we still had the old script profiler, in addition to the new one, I think they served radically different purposes .. if my input is any help in suggesting things )
Also if you use most things as archetypes, then they can change the defaults on everything that is created from an archetype, without ever touching the code or compiler
declare your variables with
var(somegroupname) blah;
then ingame, either standalone or pie, under the rc actors tab, find the actor you want to edit on the fly and in it's properties (under the category somegroupname), you'll find your vars.
Your LD's can experiment away, note down the settings you like, tell you, you stick them in the defaultprops. Cuts down iteration time massively ;p Works for the greater majority of variables.
Is there a way to turn off config caching in the editor?
I'm a programmer on a 15 person dev team. I know how to expose unrealscript variables in the ini files using the "config" keyword, and I am doing this all over the place. This way the level designers can tweak these variables for balancing without having to recompile the code.
Right now the LD workflow is like this:
Open the editor
Run the game in PIE mode
Close the editor
Change an ini file setting
Open the editor
Run the game in PIE mode and see changes
I want the LDs workflow to be like this:
Open the editor
Run the game in PIE mode.
Edit some setting in an .ini file
Rerun the game in PIE mode
immediately see the change.
In other words, the editor is caching the ini settings when it boots up and so it doesn't see any change that get made to the ini files after the editor starts, so you have to completely close down the editor, change the files, then restart it for the new settings to take effect.
Is there a way to turn off caching in the editor so that it will force it to reload the ini files everytime the game is run in PIE mode?
If not, is there a more efficient way to do this than our current workflow that I outlined above?
Leave a comment: