Hi folks,
hi expert designers, common people and visionairies..
I've got this tricky issue I can't get my imagination to solve: I would love to have an event to trigger only if a player is not using electric engines and resorting to diesel instead.. Event editor (1.05) doesn't allow to check on locomotives count. Hence, I thought of checking for electric track.. but to my surprise, it isn't working... here's the event in question:
It triggers no matter what sort of tracks I have laid! Am I being completely dumb and missing the obvious? Please help - there's a scenario almost ready waiting for me to solve this enigma...
B
How to know which engines are used
Re: How to know which engines are used
I just tried the same thing you did under a TM install and it worked fine for me. However,when I tried under Rt3 1.05 it didn't seem to register company electric track, territory electric, or company-territory electric, it only recognized total electric track.
Re: How to know which engines are used
Hmm.. that will be enough I think, if... I just need to add an event making electric locos unavailable for AI companies (and possibly a cheaper price on diesel to compensate).
Thanks for the tip blackhawk. I'll let you know, in this thread, how/if it worked out.
B
Thanks for the tip blackhawk. I'll let you know, in this thread, how/if it worked out.
B
Re: How to know which engines are used
Try to add an additional condition "to be checked against companies ..."
There's no business like RT business ...
Re: How to know which engines are used
I tried adding "force test against companies" and that didn't seem to make a difference. I think I also tried "companyid = " Neither seemed to make a difference.Sugus wrote:Try to add an additional condition "to be checked against companies ..."
- Wolverine@MSU
- CEO
- Posts: 1166
- Joined: Fri Nov 10, 2006 2:14 pm
- Location: East Lansing, MI
Re: How to know which engines are used
I just tried a similar thing in 1.06 and it worked fine. Had it display a dialog when #Comp elec track=0 and it stopped displaying as soon as I laid electric track.
Re: How to know which engines are used
Did a lot of testing on this just now...
basically I tried every combination of #company electric track, #territory electric track, force testing against companies, territories, players, etc. All I could think of...
RESULTS
# comp. electric track = 0
# terr. electric track = 0
IN EVERY CASE! (in 1.05, mind you..)
Total electric track counts perfectly, however.. so i just made it unthinkable for AI to build electric (it has no electric engines available).
It works as I want, but it ain't perfect and it sure isn't "clean"!.
And, of course, a player reading this will now know that I just test for " total electric track > 0 ", which means he can cheat that particular event pretty easily.. but, let's keep it quiet.
basically I tried every combination of #company electric track, #territory electric track, force testing against companies, territories, players, etc. All I could think of...
RESULTS
# comp. electric track = 0
# terr. electric track = 0
IN EVERY CASE! (in 1.05, mind you..)
Total electric track counts perfectly, however.. so i just made it unthinkable for AI to build electric (it has no electric engines available).
It works as I want, but it ain't perfect and it sure isn't "clean"!.
And, of course, a player reading this will now know that I just test for " total electric track > 0 ", which means he can cheat that particular event pretty easily.. but, let's keep it quiet.
- nedfumpkin
- CEO
- Posts: 2163
- Joined: Sat Feb 16, 2008 9:16 pm
- Location: Hamilton - Canada
Re: How to know which engines are used
Did you try...?
test against all companies (you have it against on screen player)
force test against companies
company id=1 (but confirm the company number since if you delete the company and make a new one, it won't be #1)
#company electric track pieces=0
game year month=
Like everyone else, I can't see any reason why your original even shouldn't work, although I haven't tried it.
test against all companies (you have it against on screen player)
force test against companies
company id=1 (but confirm the company number since if you delete the company and make a new one, it won't be #1)
#company electric track pieces=0
game year month=
Like everyone else, I can't see any reason why your original even shouldn't work, although I haven't tried it.
Re: How to know which engines are used
I tried special events, writing up game messages.. just to figure it all out..
events like:
FORCE TEST AGAINST ALL COMPANIES
FORCE TEST AGAINST ALL TERRITORIES
displaying as game message:
"Counting electric track: [# Comp. elect. track], by [Company Name], in [Territory Name]"
And all sort of different triggers, testing against players, testing against specific company, etc...
I really played a bit with this, getting the counts displayed. Always = 0, apart from [Total elect. track]...
events like:
FORCE TEST AGAINST ALL COMPANIES
FORCE TEST AGAINST ALL TERRITORIES
displaying as game message:
"Counting electric track: [# Comp. elect. track], by [Company Name], in [Territory Name]"
And all sort of different triggers, testing against players, testing against specific company, etc...
I really played a bit with this, getting the counts displayed. Always = 0, apart from [Total elect. track]...
- nedfumpkin
- CEO
- Posts: 2163
- Joined: Sat Feb 16, 2008 9:16 pm
- Location: Hamilton - Canada
Re: How to know which engines are used
what about changing it to <1 just in case it is a negative number?
Re: How to know which engines are used
I didn't try the <1 but using the ledger to have the numbers display, the only one that worked in 1.05 was total electric track (even with force test companies, and company id). Was there something that got fixed in 1.06 that might have caused the company electric track condition to work now? I wonder if it works in earlier versions than 1.05.
- nedfumpkin
- CEO
- Posts: 2163
- Joined: Sat Feb 16, 2008 9:16 pm
- Location: Hamilton - Canada
Re: How to know which engines are used
I don't know...I'm baffled by this.
- Wolverine@MSU
- CEO
- Posts: 1166
- Joined: Fri Nov 10, 2006 2:14 pm
- Location: East Lansing, MI
Re: How to know which engines are used
Just tested it in 1.05 and it looks like you're right. It doesn't recognize company electric track or territory electric track. It does see total # electric track though, so if you prevent AIs from having electric trains, presumably they won't build electric track, and you can use "# of electric track pieces = 0" as the trigger.
Re: How to know which engines are used
I ran across this little statement in the 1.06 Patch Readme:
"18. Fixes track counters for electric track pieces."
Apparently, one of the bugs of 1.05V is correct counting of electric track pieces. I guess that's why 1.06V recognizes the electric track and 1.05V does not in the test trials mentioned above.
"18. Fixes track counters for electric track pieces."
Apparently, one of the bugs of 1.05V is correct counting of electric track pieces. I guess that's why 1.06V recognizes the electric track and 1.05V does not in the test trials mentioned above.
- nedfumpkin
- CEO
- Posts: 2163
- Joined: Sat Feb 16, 2008 9:16 pm
- Location: Hamilton - Canada
Re: How to know which engines are used
Well now...see what happens when you read the documentation! I am no longer baffled by this. :)
Re: How to know which engines are used
Good to know I wasn't wrong.. nice, for a newbie in this game.
Now, if you find in the 1.06 readme something along the lines of "Includes locos counters".. that would be super.
BM
- Wolverine@MSU
- CEO
- Posts: 1166
- Joined: Fri Nov 10, 2006 2:14 pm
- Location: East Lansing, MI
Re: How to know which engines are used
I wonder whether the "fix" for 1.05 is an easy one? Whoever developed 1.06 (sorry I forgot who): what part of the .exe code needs to be changed, and is it something anyone with a hex editor could do?
- nedfumpkin
- CEO
- Posts: 2163
- Joined: Sat Feb 16, 2008 9:16 pm
- Location: Hamilton - Canada
Re: How to know which engines are used
I suppose if someone wanted to do it they could. Here's the entry from the 1.06 source code.
The way it works is:
{ 0x26c3a is the location in the exe file, then 13 is the number of characters to be changed,
"\x8a\x83\x18\x02\x00\x00\x3c\x01\x75\x08\x01\xbe\x64" is what is there
"\x8d\xb6\x64\x76\x00\x00\xe8\xaf\x00\x00\x00\xeb\x48" is what should be. Note, the little Xs don't go in there.
So if anyone wants to go through the 1.05 exe and manually change the stuff below, it should fix it.
/* Fix Electric and Non-Electric track counters for all but game-wide. */
{ 0x26c3a, 13,
"\x8a\x83\x18\x02\x00\x00\x3c\x01\x75\x08\x01\xbe\x64",
"\x8d\xb6\x64\x76\x00\x00\xe8\xaf\x00\x00\x00\xeb\x48" },
{ 0x26ce6, 16,
"\x5d\x75\x08\x01\xbe\xc0\x1d\x00\x00\xeb\x13\x80\xf9\x02\x75\x08",
"\x5d\x8d\xb6\x5c\xa7\xff\xff\xe8\x02\x00\x00\x00\xeb\x59\x90\x8a" },
{ 0x26cf6, 16,
"\x01\xbe\xc8\x1d\x00\x00\xeb\x06\x01\xbe\xc4\x1d\x00\x00\x8b\x83",
"\x83\x18\x02\x00\x00\x3c\x01\x75\x04\x01\x3e\xeb\x10\x3c\x04\x75" },
{ 0x26d06, 16,
"\x26\x02\x00\x00\x83\xf8\x03\x75\x14\x8b\x86\xd0\x1d\x00\x00\x03",
"\x05\x01\x7e\x04\xeb\x07\x3c\x02\x75\x03\x01\x7e\x08\x80\x7b\x44" },
{ 0x26d16, 16,
"\xc7\x5f\x89\x86\xd0\x1d\x00\x00\x5e\x5b\xc2\x08\x00\x83\xf8\x01",
"\x00\x74\x03\x01\x7e\x0c\x8b\x83\x26\x02\x00\x00\x83\xf8\x03\x75" },
{ 0x26d26, 16,
"\x75\x14\x8b\x86\xd4\x1d\x00\x00\x03\xc7\x5f\x89\x86\xd4\x1d\x00",
"\x04\x01\x7e\x10\xc3\x83\xf8\x01\x75\x04\x01\x7e\x14\xc3\x8b\x03" },
{ 0x26d36, 13,
"\x00\x5e\x5b\xc2\x08\x00\x8b\x03\x8b\xcb\xff\x50\x14",
"\x8b\xcb\xff\x50\x14\x85\xc0\x74\x03\x01\x7e\x18\xc3" },
{ 0x8796d, 16,
"\x8b\xf1\x8b\x4c\x24\x0c\x8d\x44\x00\xff\x8b\xf8\x8a\x81\x18\x02",
"\x53\x8b\x5c\x24\x10\x8d\x7c\x00\xff\x8d\xb1\x51\x0d\x00\x00\xe8" },
{ 0x8797d, 12,
"\x00\x00\x3c\x01\x75\x08\x01\xbe\x51\x0d\x00\x00",
"\x73\xf3\xf9\xff\x5b\x5f\x5e\xc2\x08\x00\x90\x90" },
The way it works is:
{ 0x26c3a is the location in the exe file, then 13 is the number of characters to be changed,
"\x8a\x83\x18\x02\x00\x00\x3c\x01\x75\x08\x01\xbe\x64" is what is there
"\x8d\xb6\x64\x76\x00\x00\xe8\xaf\x00\x00\x00\xeb\x48" is what should be. Note, the little Xs don't go in there.
So if anyone wants to go through the 1.05 exe and manually change the stuff below, it should fix it.
/* Fix Electric and Non-Electric track counters for all but game-wide. */
{ 0x26c3a, 13,
"\x8a\x83\x18\x02\x00\x00\x3c\x01\x75\x08\x01\xbe\x64",
"\x8d\xb6\x64\x76\x00\x00\xe8\xaf\x00\x00\x00\xeb\x48" },
{ 0x26ce6, 16,
"\x5d\x75\x08\x01\xbe\xc0\x1d\x00\x00\xeb\x13\x80\xf9\x02\x75\x08",
"\x5d\x8d\xb6\x5c\xa7\xff\xff\xe8\x02\x00\x00\x00\xeb\x59\x90\x8a" },
{ 0x26cf6, 16,
"\x01\xbe\xc8\x1d\x00\x00\xeb\x06\x01\xbe\xc4\x1d\x00\x00\x8b\x83",
"\x83\x18\x02\x00\x00\x3c\x01\x75\x04\x01\x3e\xeb\x10\x3c\x04\x75" },
{ 0x26d06, 16,
"\x26\x02\x00\x00\x83\xf8\x03\x75\x14\x8b\x86\xd0\x1d\x00\x00\x03",
"\x05\x01\x7e\x04\xeb\x07\x3c\x02\x75\x03\x01\x7e\x08\x80\x7b\x44" },
{ 0x26d16, 16,
"\xc7\x5f\x89\x86\xd0\x1d\x00\x00\x5e\x5b\xc2\x08\x00\x83\xf8\x01",
"\x00\x74\x03\x01\x7e\x0c\x8b\x83\x26\x02\x00\x00\x83\xf8\x03\x75" },
{ 0x26d26, 16,
"\x75\x14\x8b\x86\xd4\x1d\x00\x00\x03\xc7\x5f\x89\x86\xd4\x1d\x00",
"\x04\x01\x7e\x10\xc3\x83\xf8\x01\x75\x04\x01\x7e\x14\xc3\x8b\x03" },
{ 0x26d36, 13,
"\x00\x5e\x5b\xc2\x08\x00\x8b\x03\x8b\xcb\xff\x50\x14",
"\x8b\xcb\xff\x50\x14\x85\xc0\x74\x03\x01\x7e\x18\xc3" },
{ 0x8796d, 16,
"\x8b\xf1\x8b\x4c\x24\x0c\x8d\x44\x00\xff\x8b\xf8\x8a\x81\x18\x02",
"\x53\x8b\x5c\x24\x10\x8d\x7c\x00\xff\x8d\xb1\x51\x0d\x00\x00\xe8" },
{ 0x8797d, 12,
"\x00\x00\x3c\x01\x75\x08\x01\xbe\x51\x0d\x00\x00",
"\x73\xf3\xf9\xff\x5b\x5f\x5e\xc2\x08\x00\x90\x90" },
Re: How to know which engines are used
Bumpity. So over here - Re: See India By Rail - BETA Version - RoR mentioned this post about the electric track counting bug.
I never play with electric myself, but I can see possible uses for this track counter when writing scenarios. I took a quick look in the RT3.exe and the relevant bytes are easy to find. Screenshot attached.
So I can fix this easily enough. Is there any call for it? If it's likely to make a significant different to some people I don't mind doing it, but if nobody really cares I won't bother.
I never play with electric myself, but I can see possible uses for this track counter when writing scenarios. I took a quick look in the RT3.exe and the relevant bytes are easy to find. Screenshot attached.
So I can fix this easily enough. Is there any call for it? If it's likely to make a significant different to some people I don't mind doing it, but if nobody really cares I won't bother.
Complete express car and caboose packs - Custom double tankers (Alternative F era) - Pennsy H3 Consolidation
Слава Україні! Героям слава!
Слава Україні! Героям слава!