Locomotive Script...

Discussion of rolling-stock creation & re-painting.

Locomotive Script...

Unread postby tplowman91 » Mon Mar 23, 2015 5:32 pm

How on earth do I edit the .out file of a locomotive's script?

Also, do these scripts control Alerter Audio? The locomotive goes into emergency and alert flashes on the screen, but no audio, even though the sound for it is correctly aliased.
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: Locomotive Script...

Unread postby artimrj » Mon Mar 23, 2015 5:41 pm

You can not edit an OUT file. It is compiled so you can't see it, to protect the author's code.
Bob Artim - Generation X²
I don't have a PHD, I have a DD214... Freedom carries sacrifice
I'm crawling in the dark looking for the answer
User avatar
artimrj
 
Posts: 4721
Joined: Sun Jan 31, 2010 3:07 pm
Location: Beaver, Pennsylvania

Re: Locomotive Script...

Unread postby tplowman91 » Mon Mar 23, 2015 6:41 pm

artimrj wrote:You can not edit an OUT file. It is compiled so you can't see it, to protect the author's code.



So you're telling me it's impossible to make the alerter make sound?
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: Locomotive Script...

Unread postby Chacal » Mon Mar 23, 2015 6:51 pm

If then only way to fix it is by editing the out file, then yes.
But are you sure it is?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6508
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Locomotive Script...

Unread postby tplowman91 » Mon Mar 23, 2015 6:57 pm

Chacal wrote:If then only way to fix it is by editing the out file, then yes.
But are you sure it is?



How do I know for sure? The alerter "Flashes" on the locomotives computer screen, but there is no sound accompanied by it, even though the alerter sound is properly aliased in the proxyxml and bin files. The audio files are there and it is properly aliased.

But I would of thought if it was truly the scripting causing the problem, then the alerter wouldn't even flash on the computer screen... So my point is, the alerter WORKS, but there isn't sound..
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: Locomotive Script...

Unread postby artimrj » Tue Mar 24, 2015 5:22 am

tplowman91 wrote:
artimrj wrote:You can not edit an OUT file. It is compiled so you can't see it, to protect the author's code.



So you're telling me it's impossible to make the alerter make sound?


No, I am telling you it is impossible to edit the OUT file. I do not program bin files, but if you can add a child object of a flashing light I would imagine you canadd a child object of a sound, but I have no idea. And one of these gurus here would have to help you with the child object. That is above my skills and desires.
Bob Artim - Generation X²
I don't have a PHD, I have a DD214... Freedom carries sacrifice
I'm crawling in the dark looking for the answer
User avatar
artimrj
 
Posts: 4721
Joined: Sun Jan 31, 2010 3:07 pm
Location: Beaver, Pennsylvania

Re: Locomotive Script...

Unread postby tplowman91 » Tue Mar 24, 2015 1:08 pm

artimrj wrote:
tplowman91 wrote:
artimrj wrote:You can not edit an OUT file. It is compiled so you can't see it, to protect the author's code.



So you're telling me it's impossible to make the alerter make sound?


No, I am telling you it is impossible to edit the OUT file. I do not program bin files, but if you can add a child object of a flashing light I would imagine you canadd a child object of a sound, but I have no idea. And one of these gurus here would have to help you with the child object. That is above my skills and desires.




Nothing is impossible!
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: Locomotive Script...

Unread postby Chacal » Tue Mar 24, 2015 3:35 pm

Technically, if you're very proficient in lua bytecode, you could edit the compiled file. Good luck with that.

You can't decompile them because the two available lua decompilers (unluac and luadec) only work with code compiled with debug information.
Of course they don't have this debug information because the luac.bat script supplied by DTG uses "luac.exe -s", and the "-s" parameter strips out the debug information. Of course, it is the whole purpose of compiling the code.

Given the error messages I get when I try, I suspect DTG also uses a custom version of luac, producing nonstandard bytecode. This is fairly common practice.

Compiling the code is a choice made by asset builders. They have their reasons (mostly, "protecting their IP").

Here's my unsollicited opinion on this. Feel free to stop reading at any time.

I see this as the "private club" syndrome: when there's a private club, everyone wants to get in, and as soon as they're in they don't want anyone else to get in.
Most asset builders got their knowledge from posts on public forums (mainly UKTS), and from uncompiled code in other builders' products. Now that they've become proficient, they don't want to share the knowledge anymore.
The result of this will be the disappearance of freeware assets, because only payware assets will have advanced features.
Protecting one's IP is understandable, of course, given the number of hours one spends in writing it. I wonder how many hours I've spent helping people and spreading knowledge in forums. Maybe I should start charging for it.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6508
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Locomotive Script...

Unread postby tplowman91 » Wed Mar 25, 2015 4:12 pm

Chacal wrote:Technically, if you're very proficient in lua bytecode, you could edit the compiled file. Good luck with that.

You can't decompile them because the two available lua decompilers (unluac and luadec) only work with code compiled with debug information.
Of course they don't have this debug information because the luac.bat script supplied by DTG uses "luac.exe -s", and the "-s" parameter strips out the debug information. Of course, it is the whole purpose of compiling the code.

Given the error messages I get when I try, I suspect DTG also uses a custom version of luac, producing nonstandard bytecode. This is fairly common practice.

Compiling the code is a choice made by asset builders. They have their reasons (mostly, "protecting their IP").

Here's my unsollicited opinion on this. Feel free to stop reading at any time.

I see this as the "private club" syndrome: when there's a private club, everyone wants to get in, and as soon as they're in they don't want anyone else to get in.
Most asset builders got their knowledge from posts on public forums (mainly UKTS), and from uncompiled code in other builders' products. Now that they've become proficient, they don't want to share the knowledge anymore.
The result of this will be the disappearance of freeware assets, because only payware assets will have advanced features.
Protecting one's IP is understandable, of course, given the number of hours one spends in writing it. I wonder how many hours I've spent helping people and spreading knowledge in forums. Maybe I should start charging for it.



Could you provide some links for me on UKTS in regards to maybe some information on scripting, and how to write or change code, or maybe have a reference or template to look at?


Thanks.
Win 7 x64 - Intel i7-4790k 4.0GHz - 8GB DDR3 RAM - 1TB WDC HDD - nVidia GeForce GTX 960 GDDR4 2GB - PSu CX600 - ASRock Z97 Extreme 3 Motherboard - Corsair H55 CPU Water cooling
User avatar
tplowman91
 
Posts: 69
Joined: Tue Mar 10, 2015 8:47 pm

Re: Locomotive Script...

Unread postby Chacal » Wed Mar 25, 2015 4:21 pm

You are asking me to do a search on UKTS and post the results here.
I love helping people, but not that.
I can only direct you to the search function on UKTS.

For a good example, I suggest the script for reppo's Centipede loco.
There are lots of others that are simpler.
Also get the free Russell snow plow from Britkits, the lua scripts are interesting.
I did a lot of experimenting with them.
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6508
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada


Return to Rolling-Stock Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron