a question for the pros here


(Teuthis) #1

I have a wierd glitch I’m Scratching my head about. I have an error in my new map that only occurs when the map is running online on a Server but not when I go host game offline using the same pk3. In Detail, I have some Gold bars that are loaded on a Train and they appear flipped after being loaded on the Train until the Train enabler is activated. then they flip back and appear normal. There is a script line that brings the Gold on the Train in Position when the map spawns and it seems as if this script line is ignored but only when the map is played online.

that doesn’t make sense to me. Can someone bring light in here?

the Problem is I can’t fix a Problem that only occurs when the map is on a Server but that doesn’t occur when I devmap my map offline :frowning:


(twt_thunder) #2

this I gotta see to come with any useful comments I think teuthis… but the “tug” does it have a model?
if so then it still can be a tag_problem…


(Teuthis) #3

no, the tug is made out of brushes and so is the Gold that is loaded. I tried very early on to have the tug as a model (from diego) and the Gold as well (model made by you). The Problem with the tug was that the tug went off track, so made my own one. The issue with your model was then that when you use the attachetotag command, then you do not see in the map file where exactly your model will be sitting on the Truck. This was however, an absolute requirement to make the crane work, since you Need to tell the crane very exactly where to go and where to pick up something etc.

the Major Problem here is the following: no matter how I place my tug and the Gold into the map, they appear flipped at map start and only after the Train enabler is activated the first time they flip to the right Position. Whereas I do not understand this, I circumvented this Problem but activating the enabler via the script (instead of a Player) at mapstart. this then causes (when I run the map offline) the Train and the Gold to appear in the right Position right away. This issue now is that somehow this particular script line gets ignored. strangely only the one for teh Gold is ignored, the Train appears normal.

ugly Thing here is that I can’t fix a Problem that doesn’t occur when I run the map in devmap. I can’t release 20 Versions hoping that with the next test it works. …


(phisherman) #4

What do you mean by “flipped”? A screenshot correct vs flipped would be helpful.
Generally, if something is looking or behaving differently in different game setups, it is most likely caused by different pk3s with counteracting shaders or something like this. An approach to debug this would be to try your map on a fresh install and, if the problem doesn’t occur there, start deleting pk3s from your server or home directory until you figure out which pk3 is causing the problem.


(Teuthis) #5

Thanks a lot for this valuable comment. Problem is there are no issues when I try it offline in any of my three ET installations, even a clean fresh install vs. My playing installation. The problem is when the map is on a server. Since the server is not in my hands and not under my control I can’t control which pk3 they have in et main :frowning:


(WuTangH) #6

Maybe its not etmain :confused: …Its possible to add server packs to mod folders too…
Try to load the mod (e.g. silentmod, nq or whateva) that server use and test map on it. :slight_smile:


(stealth6) #7

Yea, as WuTangH said you could run a “server” on your computer with the same mod as where the problem is occuring. Then it should also occur on your computer allowing you to test things until it’s fixed.


(Teuthis) #8

I’m afraid I’m not smart enough to set up a server. I’m more the guy assembling the brushes :slight_smile:


(Mateos) #9

Mmh, if you have someone under your hand to quick testing, with the script loading function any recent has, you could try to mess with wait values; Perhaps the flip is right after some actions, and there’s no wait between. I had issues of instructions “skipped” because too much instructions at once without any wait ^^’

Is there a lot of entities with some trigger_multiple structure and func_timer, thus running in background from map load to end?


(Teuthis) #10

Thanks Mateos. Maybe worth if someone can double check my script. I will certainly play around with the wait values. Main issue remains that I can’t fix something that doesn’t give me an error when I run the map in devmap. I will need a server to throw the map on to test a couple of things.


(Mateos) #11

Oh also, you can use g_scriptDebug cvar so what’s executed script-side is printed in the console, but as I pointed if you have several trigger_multiple/func_timer, it will result in a spam ^^’ Set that cvar to 1 when you want prints


(Teuthis) #12

That’s very good to know mateos. i need to do this while on a server to compare then what got executed against what is executed in devmap mode


(TomTom7777) #13

g_scriptDebug is spammy verbose so I generally add print “text” statements to check script flow in the console and console logfile. The added prints can be used with a debug parameter if you want to turn them on/off.

Debug Print Statements

There are 3 print commands available just for debugging the script in addition to the normal game message system announcements.

print [/scriptdebuglevel] <text>
Prints ‘text’. Mostly for debugging purposes. If the ‘scriptdebuglevel’ is specified, then the text will only get printed if the g_scriptdebuglevel cvar is above or equal.

printaccum <accumNumber>
Prints the value in ‘accumNumber’ to the console.

printglobalaccum <accumNumber>
Prints the value in ‘accumNumber’ to the console.

setdebuglevel <scriptdebuglevel>
Script command to set the cvar ‘g_scriptDebugLevel’ to ‘value’

Note: Missing from the debug print commands is a command to print the value of a cvar. Lacking a way to automatically print them from inside the script file, you will have to print them from the console yourself.

Cvars can be used (but very rarely are, as Cvar script support was never finished in original ET) in the flow control statements in the script file. And you can have multiple script files that you run selectively from the console (see below)

entityscriptname <scriptname>
Changes the cvar value of ‘g_scriptname’ to ‘scriptname’. This value is then used instead of the map name, the next time the map is restarted.

G_scriptname

g_scriptname is the cvar that identifies the script file used by the map. It is normally set as “” or default which means that the .script filename is the same as the map’s .bsp filename. To try out a different script file (rather than doing a rename-swap) open the console ’ and type:

/g_scriptname <new-scriptfile>
/map_restart

NOTE: <new-scriptfile> is the filename of the script file you are testing. The scriptfile must be in the /maps sub-directory in either /etmain or /fritzbot directories (or whatever your mod directory is). It can be in the /maps directory inside a pk3 file in the latter 2 directories or if /sv_pure is zero it can be unpacked to /etmain/maps or /fritzbot/maps.( or generally /<mod-directory>/maps )

WARNING; DO NOT add the filetype extension (.script), or mistype the filename for the field <new-scriptfile>. ET will not prevent you from using a non-existent or incorrect file and ET may crash later-on in such a case.


And BTW Please excuse a bit of Captain Obvious but this list might help somebody one day.

If /devmap <mapname> works but /map <mapname> does not;

1) Check the value of sv_pure! Typically set 0 for devmap, and 1 for map tests. In which case a file inside the map pk3 may be older/wrong as compared to an unpacked file of the same name and path outside the pk3. E.g. …maps\mapname.script . In the case of a mod check the mod path too in your installation (e.g. for FritzBot Et …\fritzbot\maps\mapname.script )

2) For memory issues the number of pk3 files in etmain affect the amount of stuff communicated to the client in map mapname which may result in dreaded resource errors. devmap mapname does not communicate to the client this extra data. Therefore final tests even on developper installs should use /map <mapname> for enough cycles with enough bots to stress test the resources (eg. ‘lots’ of Field op bots)

If a clean install works with /map <mapname> (with /sv_pure 1), and /devmap <mapname> (with /sv_pure 0) also works but adding the other pk3s to your server (list or dedicated) makes it fail, then a conflict or resource issue is likely with those pk3s. In your case another pk3 may have an equivalent path and filename inside. In such cases it is useful to be aware that pk3s are loaded in an alpabetical ordering ( a.pk3 before z.pk3 ) and unpacked files are loaded last (when /sv_pure 0).


(TomTom7777) #14

Interesting. I have at times suspected a wm_announce overload bug might make scripts skip what comes after inside the code block. (so I try to make my mods before wm_announce statements). And I also search for any instance of resetscript JIC.

Other commands

resetscript
Causes any currently running scripts to abort, in favour of the current script.