Events are driving me nuts.

Tips and Tricks on Events, Economy, etc.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Events are driving me nuts. Unread post

The first stage of my scenario requires connections between cities. Now, there's a handy "company stns connect cities" tirgger - so that should be what I want - I looked at how it's done in other scenarios which I know to work - event triggered by connection trigger and game year less than a given value, effect to make CV1=1 and then in the status page, use that CV1 to toggle connected/unconnected. Except that it doesn't.

I tried advancing time in the editor and making the connection, doesn't work. Tried playing the scenario in player mode, still doesn't work. In editor mode, there's the event debugging list which shows only the status events processes 639 times and nothing else processed at all, so that doesn't help. The connection event (for example, London to Bristol) is being evaluated and triggered, because it's set to show a newspaper page - it shows the page when the connection is made. But CV1 is either not being set or the connected/unconnected thing in the status event is not right, or for some reason CV1 is being reset to 0 - because the status page shows "unconnected" before and after making the connection... I have an event that resets CVs, but that requires the game year to be later (this is to allow for a second set of connections, for silver) so that event shouldn't trigger. I did see in one scenario that those connection events had "force test against companies" set to true, is that needed?


Is there any way to play the scenario and see the event degbugger (if that actually works) or some other way to see what's happening?

RT 1.05, by the way, with coast-to-coast.
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: Events are driving me nuts. Unread post

Did you by chance create one or more companies in this scenario and then delete them? The script will treat whatever Company ID #s already used as not available, and assign new companies #s ascending from whatever the highest already used # was. Example: If you make a company the event engine will assign Company #1 to it. If you then delete that Company the engine does not reset the Company #s, the next Company created would be #2. It is also possible that you are not designating the event properly, i.e. not specifying the correct company or other variable in the event.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

that may be it. however, it's testing on "on-screen player company", I think. the player company is in fact ID#6, but that company is assigned to player control at the beginning of the scenario. I'll experiment with changing it to GV, see if that works. If so, the this might be the issue. Might be I need to specify the company specifically, if you can even do that.

[edit] OK, that seems to be the problem. I tried adding "company ID=6" to the trigger for the event checking the connection, that still don't make it work, however, changing it to use Game Variable 1 rather than CV1 makes it function as expected. So the problem would seem to be that the status event is checking CV1 for a company other than ID#6, or maybe that the check event is assigning the value to CV1 for another company. :roll:

[edit] specifying company ID 6 in the status event and in the check event doesn't make it work using CV. Could be because player ID #1 is controlling company ID #6? The check event shows the newspaper at the expected time when specifying ID#6... the check event says "apply effect to the company for which the condition is true".

as it happens I think I can use GV instead but it's not how it should be.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Events are driving me nuts. Unread post

Llew, always try to post screen shots of your events when asking for help trouble shooting...it makes it easier to see what is going on.

I tend to stay away from ID#s as much as possible.

I tend to prefer to make multiple statuses...statii? :) and just write what I want in there....e.g.

cv1=0 as a condition for the status and then I would write that the connection wasn't made. cv1=1 and I will write that the connection was made.

This way you are using the variable as a condition for which status will come up. I find it is easier to keep track of things that way. In the scenario I am testing now, I actually have 6 different status pages that will come up depending on different dates and GVs.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

I could screenshot it, but I honestly don't think it's wrong, just not working. As to *why* it's not working, that's another question. I have verified that the event works by using GV instead of CV - and it operates as it should. The only conclusion I've reached is that the event sets CV for company ID#6[1] but the status event reads some other company, probably ID#1 since the player is #1. If that's happening, well of course CV1(ID#1) is not set to 1 and therefore the status event reads incorrectly. I'll try one more test, make it apply to all companies, and see if that works. I'm not actually using the CVs in other (AI) companies, so if they get set to various values it won't affect anything.

It's possible that the event is setting the wrong CV but I put a company ID trigger in there, which should mean that it can only trigger if the right company does the connection, and the effect should only be applied to the company for which the trigger is true.

[edit] just changed it to "apply effect to all human companies" and the status event reports correctly. My conclusion is that status is reading from the wrong set of company variables. since there's only 1 active human company, and I don't intend trying to make this map multi-player, this will work and not cause problems.

[1] and as to why that's the player company... long story; mainly, because I'm not about to try to rebuild the map from scratch with sundry rivers and 135 cities to place.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

I'm gonna give this up soon. I thought I'd worked it out... I had the connection event working using company variable, this morning (see other post). OK, it's not using the *right* CV but that didn't matter, the status event reported correctly. So then I create a new event for another connection, using the same trigger conditions bar for different cities, and oh look it doesn't work again.

I can use game var instead, but that only allows for 4 variables where I really wanted 7. Territory variable won't trigger connected/unconnected, the option isn't there in the status event, so that's out. I can also re-write it to count require connections and the status can then read "you have made n out of 7 required connections, but dammit I wanted the list with connected and unconnected in.

I don't suppose there's any way to copy the map, cities, rivers etc. but not companies to a new scenario file? No way am I redoing the map from the start, I have like 135 cities on it in more or less the correct geographical places.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Events are driving me nuts. Unread post

Llewelyn wrote:I don't suppose there's any way to copy the map, cities, rivers etc. but not companies to a new scenario file? No way am I redoing the map from the start, I have like 135 cities on it in more or less the correct geographical places.
I know this is a little late in the game, but one thing most of us have learned (and is discussed several times throughout the forums) is that every time you save new work on a map, save it with a new name. That way if you run into a situation like you're in now, you can go back several saves to a time before you started the companies.

It's also a good idea to hold off on painting the terrain until you're done with all the events.
Hawk
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: Events are driving me nuts. Unread post

Llewelyn wrote:I'm gonna give this up soon.
It sounds like you have invested a huge amount of time and effort into this game map and that you are fairly close to finishing it. I would hate for that to be wasted. If you will allows others to take a look under the hood at your work-in-progress please post the map as it is into this thread as a zip file. A solution might be found that way (I will certainly take a look).
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

Heyho. I've worked around the first level status. The 2nd one (for silver) is now not reporting correctly, presumably it's using LTD company industry profit from the wrong company again. I can probably work around that one also.

The main problem appears to be the company IDs not matching player ID in the status events - which is not, as far as I can see, fixable except by starting over on a new map, which would be kind of tedious.

I can easy enough get player ID#1 to control company ID#6 and as far as I can see the events doing the actual checking are going to work, simply by having company ID=6 in the conditions. The company ledger reports all the right figures - so for example LTD industry profit is shown in the ledger as X million, but in the status event it shows as 0 - the problem appears to be that company-specific variables used in status events are NOT using company ID#6's variables - even if the event has that in its conditions. Game and Player variables work as expected: I used GV1 to count number of connections made (from several required) and it counts up fine in the status event. Chances are this is a bug in RT code somewhere, I reckon. I'd expect the status event to use company variables for the company controlled by the player.

I'll look into whether I can assign those figuresd to, e.g., a player variable - could be that will work. Triggers and effects seem to work correctly, i.e. applies to the company I want it to (and, in any case, I can do "all human companies" since there's only one in the scenario.) Example: one of the early events for a connection donates 50K to the player's company, and that works, the company cash goes up by $50K.

That done the win conditions should work OK, then it's just finding a way to get the status to report as I want it to.

I'll post it and you can all go "I wouldn't have done it like that". Neither would I if I did it again... :-)
Last edited by Llewelyn on Tue Oct 16, 2012 3:48 pm, edited 1 time in total.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

well here it is. I hope you have enough graphics and stuff for it... one thing that's nice about old(er) games on modern hardware is how well they run compared to how they used to back in the day :)
Attachments
Great Britain Great.zip
(2.04 MiB) Downloaded 258 times
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

one other thing: I wanted the game to have just the 3 companies it starts with. so I set "can't start multiple companies" which I guess was wrong, as the AI whose company I took over when testing promptly started a new one. I've now set "disable starting any company". But, does that apply to AI players, and if not, is there a way to stop them starting more companies?
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: Events are driving me nuts. Unread post

Disable starting companies will affect all players. But then that means all the companies will have to be created.

It can also be accomplished via event so that when a player doesn't control a company, then set their cash to 0. They can't start a new company then.
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: Events are driving me nuts. Unread post

I downloaded the map and tested it through silver so the gold status would show. Here are my comments:
1. Bronze status (Status 1) and bronze check worked fine. GV reset worked fine.
2. Bronze loss should have 1870 as the condition (not 1880).
3. Silver status (Status 2) and silver check worked fine. Show the goal of $20M profit and 30mph as part of the status so the player knows what the goal for silver is.
4. Gold status (Status 3 >1921) was missing 'Company ID=6' as a condition. Then it worked fine. Add the 'number of companies on the map' to the status so the player recalls that they need to be the only one remaining.
5. Gold check needs Company ID=6 as a condition. It also needs to be set at 'end of the month'.
6. Bronze & Silver Check should be 'Dialog' and not game message. The player may miss seeing the game message.
7. Look at the "Event Validation" page. There are some errors which need correcting.
8. Check the river at Barmouth. It is more on the hill than the valley.

There is another matter which will probably change some of your events. The player may connect to Dover before 1871 since it is so close to London, but will not receive credit for the connection in the GV count. This is true for Portsmouth, Birmingham and Holyhead as well.

Here is a possible solution. Use GV1 for the first set of cities. Use GV2 for the second set of cities. Count the connections in GV1 as it already is. Count the connection in GV2 from the start of the game to 1920.

Overall, it appears to be a good map with a challenging scenario.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

working on some stuff, hopefully the status will change when you reach the bronze/silver goals now. I'll upload it somewhere (I'm guessing there's a correct place) once I see if it's working.
User avatar
Hawk
The Big Dawg
Posts: 6504
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: Events are driving me nuts. Unread post

Llewelyn wrote:I'll upload it somewhere (I'm guessing there's a correct place) once I see if it's working.
If it's another test version, just attach it to a post like your last one.

If you think it's completed and ready for the archives, see this topic. viewtopic.php?f=81&t=2824
Hawk
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

Looks like the events are now working as planned. It's not finished yet, need to research some more "news" for it and maybe fling in a few more choices. I added one this morning allowing you to import the Consolidation (at a price!).

If anyone tests, I'd like to know in addition to any glitches,
a) what years you reached bronze, silver, gold
b) what difficulty you played on

as I may want to tune the difficulty. So far, bronze appears dead easy - currently working on getting the silver conditions, now it looks like it's working - industry profit is easy enough, getting express speeds up to 30 mph might not be - currently I'm at about 1860 and it's only 15 :-)
Attachments
Great Britain Great 2.zip
(2.03 MiB) Downloaded 203 times
User avatar
Stoker
Engineer
Posts: 569
Joined: Mon Dec 08, 2008 12:18 pm
Location: Amongst the Sagauros

Re: Events are driving me nuts. Unread post

30 MPH average express speeds in that time frame are probably not realistic and will just force people to work around that by setting all of the normal lines to carry only freight, and then have another line to make a run or two per year with express only to meet the goal. I would test the map a few times and check your average speeds and then base the goals off of what is actually possible.

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

You have until 1920 to achieve that, it may need adjusting. I'm in the process of a proper test of that aspect, among others.

What I'm aiming for is a scenario that runs from 1835 til at least around 1950 - the trick is having credible goals. The bronze goals may prove to be too easy, might make that harder and extend the bronze time.

I wanted gold to include at least 50% electric track and engines, but there doesn't seem to be a way of doing that, not in RT105 at least. I can probably work in a minimum number of electric track sections or something.
Llewelyn
Hobo
Posts: 14
Joined: Tue Oct 09, 2012 4:08 pm

Re: Events are driving me nuts. Unread post

Found a silly mistake - the event called "Consolidation" in 1866 should be one-time-only... :oops:

please change that in editor if you intend to test this map, otherwise it pops up every month :-)
Post Reply