R Soul on 7/10/2018 at 01:09
The scripts written for Mission X wouldn't always load. For people using NewDarkLoader, they'd never load. The most obvious thing affected is the conv mask system. At first I thought about using the existing script modules (e.g. NVScript) and making some tweaks in Dromed to send custom messages etc. But it very quickly became clear that it would a massive undertaking.
Did you ever see the (
http://www.ttlg.com/forums/showthread.php?t=129598) flow charts? There's such a large number of objects, and such a complex network of links and messages I realized the only two options were to get the source code and recompile it, or rewrite the scripts myself in Squirrel. Either way needed the source code. I opened each of the osm files to look for the script names (e.g. TrapLinks, ConvMask etc) and found that they were all in 'cosas2.osm'.
I needed to find out who wrote that. I noticed that Telliamed was credited in the readme's scripts section, but tnhScript wasn't included. cosas2.osm contains references to TrapThreshold, TrapRandomTimer etc, so this was a custom version of tnhScript. I remembered reading that older versions of that osm had trouble loading because of the way they were compiled, which gave me hope that cosas2 could be recompiled in the same way.
I got in touch with Telliamed and he still had the source code and some documentation. I had a go at compiling it myself but I was way out of my depth, like a sparrow at the bottom of the Mariana Trench. On the other hand, my attempt to start with one of the simpler scripts, TrapLinks, in Squirrel was getting promising results, so I decided that was the way to go. Maybe I could have asked Telliamed to recompile the source, but I didn't know his circumstances or how involved it would be. Since I started this, I decided I'd finish it.
I didn't have to do all of TrapLinks. The original script had some features that MX didn't use, so I then moved on to the conv mask system.
This was interesting. An inventory mask plays a schema (VO) when frobbed, but there needs to be something in place to prevent it playing if another VO (e.g from another team member) is currently playing. All masks and VO objects send a message (I think the schema name was a parameter) to a central VOManager, which decides to either play the schema or add it to a queue.
The approach I took was to just copy each function in the source code and "translate" the c++ statements into Squirrel statements. The two languages use a similar syntax, so I just took it one function at a time and kept the logic flow the same. There were times when some little thing just wouldn't work, but then I'd notice some tiny error in my code, or realise that something set up in the original didn't apply in Squirrel, or that I'd misunderstood what the original code was doing. Gradually I got closer and closer to getting the mask scripts working. And then they worked.
The next step was the subtitles. They weren't just using OnScreenText, but a custom version that inherited many of its functions. It looked very complicated, so this one I rewrote myself after working out what messages it responded to and how to convert the HTML colour codes to the integer used by the engine.
Some of the basement scripting (for the Elevator task) was also done with this module, so I rewrote them too. I had a bit of trouble understanding the light scripts, but again, I eventually got it to work.
It was nearly over. There was one script from Monkeyscript.osm that was being used by a few objects, but I wasn't sure what it did, and the module hardly ever loaded under any circumstances. I went to the TTLG Discord Channel looking for Mortal Monkey, and NV pointed to to Steam. I was finally able to exchange messages with MM, and while doing this, the penny dropped and we worked our what the script was supposed to do. And once, (out of countless attempts) the module actually loaded and I could see it in action. After reading an important document, it shows a 'copy kit' object if you have one, as a hint that it should be copied. If the player didn't have any copy kits, it would just show the 'last note' object, but I thought that was confusing, so I edited my version to briefly give the player an object (no visible model) whose name was something like 'you need a copy kit for this'.
While I was waiting for hear from MM, and also after I'd rewrote his script, I decided to relax by making some visual tweaks. I aligned the cobble texture outside, improved some objects' UV mapping, and rebuilt some of the arches to give them a perfect vaulted shape.
Probably the last scripting task was with the conv masks. I thought that one of them was given to the player too soon during an exchange between two other characters. It was quite tricky to follow the links and messages, but I eventually got it to appear after their lines were over.
I then had a bit of a break, tweaked some texture alignments, and then got a couple of people to test it. Then I released it:
(
http://www.ttlg.com/forums/showthread.php?t=149211)
vfig on 7/10/2018 at 15:26
Congratulations, R Soul! I've done a couple of that kind of full-rewrite-with-exact-feature-compatibility on other projects (completely unrelated to Thief), and I know how much effort it takes. Very well done!
I've not yet played Mission X, so I'm also very glad to hear that it'll now work when I get down to it on my list.
gamophyte on 8/10/2018 at 20:19
Wow thank you, that was fascinating, and thanks again for your work. Funny enough I've never actually had scripts fail on me during a play through. Well, that I know of. Seemed smooth, but this could mean that I should play though again to see if any had. The only issue I had was sometimes in the barracks the AI seemed to be way more aggressive, yet dumb. They would all file in and search for me in the dark rec room and nearly not forget. I think it was a old CPU issue to be honest. Glitchy kind of. Look forward to re-playing!
Quote Posted by vfig
.......
I've not yet played Mission X, so I'm also very glad to hear that it'll now work when I get down to it on my list.
I envy you, it's a nice paced classic. Brings new feelings to the stealth play.
gigagooga on 16/10/2018 at 13:45
They could, but i would guess the artwork on the stone trim would then have sections portrayed in it. Like, between each beam, there would be individual rectangular picture.
Yandros on 16/10/2018 at 14:19
I think beams like that are fine and don't look unrealistic at all, although I might remove every other one. I would however suggest you add a layer of dirty roughness or similar texture on top of the Tudor textures, they are stark white which doesn't look realistic.
Cardia on 16/10/2018 at 16:21
thank you both, Russ what do you mean by "I might remove every other one" ? which one are you talking about, yes the tudor texture like in light bright looks to clean, but in dark its hardly noticeable, but i think i will follow your suggestion and add a dirty mask/layer on them.
Yandros on 16/10/2018 at 17:21
I meant I might remove every other beam sticking out so there weren't so many of them, but that's just my own taste. If you like the number of them it's fine, I just think there are too many but again that's my personal taste.
PinkDot on 17/10/2018 at 09:05
Quote Posted by Yandros
I meant I might remove every other beam sticking out so there weren't so many of them, (...)
You clearly want the building to collapse. Where do your destructive wishes come from?!?
Cardia on 17/10/2018 at 09:44
You´re right Russ, this Alsacien facade looks better with a dirty layer, and also it looks better with less wooden beams coming out:
Inline Image:
https://i.postimg.cc/HLQnmJ6f/dump105.png