How trigger a set point after you merged with a AI player

Tips and Tricks on Events, Economy, etc.
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

How trigger a set point after you merged with a AI player Unread post

Hello folks,

Just trying the editor for a short time now.

I have a Question: How do you set a trigger point event, after you merge with an AI **!!!** . a time trigger is not use full, because you don't know when you are able to merge.
This is a variable, so i need to know how to set it.

I under stand with game/company/player variable, every step done + 1 with the value. till you have your out come result you want.

In my test map there are 18 companies active, every time i merge, I want to have a message and set the next trigger.

It's almost like programming a PLC, but i mis the set point. :-?

How fully someone has an answer for me, to settle my problem.

and have a nice day !!howdy!!
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: How trigger a set point after you merged with a AI player Unread post

Depends. Are there always 18 companies at the start? Is it possible to make new companies during the game?

If there are always 18 companies at the start, and if starting new companies is disabled, you could just check against total number of companies and use that to set a variable. If the check runs at the end of every week or month, it should be good enough.
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

Re: How trigger a set point after you merged with a AI player Unread post

Yes i know that one, But that is not working, There are 18 companies and no more free cities.

When i say 18 companies there, and say 18 it still trigger before i put one out of business. in True, and False!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

My set is ID1 or ID2 or ID3 or till 18 set a variable to 1. That's my "A" signal is and repeating constant. An Or signal the "A" is always high.
My "B" is 183107 yyyymm AND 18 companies that give "B" (time is a test, stable value)

And for trigger 1 i use A AND B to trigger my First after merge message.


Now The funny part, When start, selected weekly, it is giving an auto repeater, While Value B is set back to 0 !hairpull! !hairpull! !hairpull!
Also to Trigger "B" I need to pass the time setting given earlier, This is completely ignored, I tried several setting the last few day.

I know when i merge the company 9, in the line of 18 number 9 is gone, so i"ll tried to use ID numbers, also failed.

Deleted all events with, merging and rewrite all, still same problem.

if anyone has any more suggestions **!!!**
User avatar
Blackhawk
CEO
Posts: 1112
Joined: Thu May 21, 2009 2:34 pm

Re: How trigger a set point after you merged with a AI player Unread post

I'm not sure how exactly you are doing this but I just ran this event:

-Force test against companies
-# of companies = 1

Check weekly.

I started with 2 companies, merged them, and the event triggered.

Try doing:
Force test against companies
# of companies < 18 (or do =17, =16, etc if you want specific messages for each merger)
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

Re: How trigger a set point after you merged with a AI player Unread post

Yeah,

When I think about it, it can maybe work.

I also want a specified message in 3 companies, they are bigger than the rest, so add a little bit more.
Still thinking up the story board, i will start small and must all buy back, what was lost to investors or something like that.

still in progress ::!**!

Will try, !$th_u$! gumboots and Blackhawk.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: How trigger a set point after you merged with a AI player Unread post

You can also go:

Test weekly, or monthly against all companies. One time event.

force test against companies
there is a company with id 18 (false)

Do an event for all 18 companies. Makes sure you check the company numbers to make sure that all the numbers are correct..i.e. if a company was created, deleted, the re-created the first number is used and won't be used again. But look at the companies themselves to make sure you have the number right.

Us company 1 too in case the user jumps to another company.

This way, you can use a different message for every company, and different effects.

You can also expand on this to put in events where if company a is merged with before company b, then something happens. You can also use it to track if new companies are created.
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

Re: How trigger a set point after you merged with a AI player Unread post

Hello,

tried many setting Force test against companies with there is a company with ID True. Triggert but the wrong way
change there is a company with ID to "FALSE" No trigger, After the merge also not. Still wrong

I found out that the company ID is gone After you go with "Shift E back" in editor mode

So there is noway to use the company ID for a message after it's gone (merged)
So I can't use it for what i wanna to try.

Also when you bankruptcy a company without assets it's gone.
Does it has assits, you will find it in the merger list.

What GumBoost and BlackHawk mentioned is "# Of companies" i had to use.

I think it's the only way.

You can proof me i'm wrong please do!!!

see you later !!howdy!!
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: How trigger a set point after you merged with a AI player Unread post

If you are trying to edit a map by playing it, then Shift+E into the editor, then back into the game, you're probably going to run into a lot of problems. That way of doing it should only be used for temporary edits. Not permanent editing.
The best way to create/edit a map is load it in the editor at the start. Do your edits. Save the map using a different name (if you save using the same name you will experience graphics degradation). Then test by playing it.

Are you trying to create a new map, or are you trying to edit an existing map?

If you're trying to create a new map, then you most definitely want to load the map in the editor. Not the game, then shifting into the editor.
Hawk
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

Re: How trigger a set point after you merged with a AI player Unread post

I'm using Mississippi valley map, hawk.

Added some more cities and all tracked up.

I have used "Shift E"only to go from the game in to editing and check triggers, and make small changes and try
If it works i load the map in editor mode, make changes in there.
I tried it before but gave problems, with start year and other small things, like unwanted merged companies.
(if you save using the same name you will experience graphics degradation)
this i din't know, thanks for the tip.

later
User avatar
Hawk
The Big Dawg
Posts: 6503
Joined: Fri Nov 10, 2006 10:28 am
Location: North Georgia - USA

Re: How trigger a set point after you merged with a AI player Unread post

Here's one thread discussing the subject.

viewtopic.php?f=65&t=530
Hawk
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: How trigger a set point after you merged with a AI player Unread post

Falcen81 wrote:tried many setting Force test against companies with there is a company with ID True. Triggert but the wrong way
change there is a company with ID to "FALSE" No trigger, After the merge also not. Still wrong
I too have found this did not work, at least I could not figure out a way for it to work. My solution was not to test if the company was gone, but rather to test if it was still on the map.
This solution is practical for 7 AI companies at the most.
Let's assume the player owns Company ID=1 and the AIs own Companies IDs 2-5.
For AI Company ID=2:
The condition: Company ID=2 .... There is a company with ID is TRUE.... Test against..AI companies only.... Test at end of week.
The effect: Game Variable1+1

For AI Company ID=3:
The condition: Company ID=3.... There is a company with ID is TRUE.... Test against..AI companies only.... Test at end of week.
The effect: Game Variable1+10

For AI Company 4, Game Variable1+100
For AI Company 5, Game Variable1+1000

This way each when Game Variable1 = 1110, at the start of week, then Company ID=2 is not on the map any more. Use a one time event to announce that the company is gone.
When GV1 = 1101, then company ID=3 is not on the map any more. And so on.

GV1 cannot = more than 2 billion and some, so use Game Variable2 for the other AIs.
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: How trigger a set point after you merged with a AI player Unread post

I later realized that my example missed some important details.

To test if AI company ID=2 is gone from the game, then the event would be more than GV1=1110.
The event would be (since there are 4 AI companies)
If GV1=1110 or 1100 or 1000 or 1010 or 110 or 100 or 10 or 0, then ID=2 is gone. One time test.
User avatar
nedfumpkin
CEO
Posts: 2163
Joined: Sat Feb 16, 2008 9:16 pm
Location: Hamilton - Canada

Re: How trigger a set point after you merged with a AI player Unread post

Oilcan: Actually, the event won't work in some circumstances because you need more checking events. in fact, it is 4! ie. 24 possibilities because there are 24 ways that 4 numbers can be arranged.

Therfore, you would need "or" conditions.

GV1=
1011 OR
0011 OR
0001 OR
1001 OR
1010 OR
0000

This way, you get all combinations where the second digit is a 0.

.....

I was also thinking that another possibility would be

Force teest against companies
company ID=2
company assests <0

This way, as soon as a company has no more assets, it will trigger.
User avatar
Falcen81
Hobo
Posts: 19
Joined: Thu Nov 28, 2013 7:23 pm

Re: How trigger a set point after you merged with a AI player Unread post

Hello,

I've done it I think !*00*!

Really now i still have a lot of testing to do, if all Variables work, made a small test with 8 companies.
Every I time merged I got the message after a week setting. company ID1 showed ID1 merged..
And if i started with ID3 i got message 3.

I did not Use, "Company settings at all.
OilCan wrote:

For AI Company 5, Game Variable1+1000

This way each when Game Variable1 = 1110, at the start of week, then Company ID=2 is not on the map any more. Use a one time event to announce that the company is gone.
When GV1 = 1101, then company ID=3 is not on the map any more. And so on.
and
nedfumpkin wrote:

Force test against companies
company ID=2
company assets <0

This way, as soon as a company has no more assets, it will trigger.
Because the ID is "terminated" after the merge. So the set point will be gone. resulting that the even will NEVER Trigger
i found that out a few days ago.

Also when you bankruptcy a company without assets it's gone.
Does it has assets, you will find it in the merger list, after the merge it's gone. !facepalm!

This gave me a lot of problems, tried a lot of possibilities !hairpull! not working.

:idea: What I did: Use "COMP. STN CONNECT CITY TO CITY". I maybe din't say the map is fully railed up with no more cities without a station, !*00*! My mistake, sorry !facepalm!
With the force test for player and company also

I got one more Company installed, was not necessary, found out later.

I made 19 events, with sub events, if you brought 1 group together. Got 6 groups.

Every Company Has stations, minimum 6, I selected 2. When i Merge the two stations belong to me, which is a trigger point and will give me the message i want.
Only look if the stations are from the same company, or it will not work.

This way i can first buy Company 2,5,7,14,21 in every order I want, and still get the same message. and even if i change as chairman from 3 to 6. it still works if correctly.

After the testing i will confirm that.

Everybody thanks for the help !$th_u$!
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: How trigger a set point after you merged with a AI player Unread post

I'm glad that you found a way to make it work. !!clap!!
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: How trigger a set point after you merged with a AI player Unread post

Oilcan's method is good. I'm sure that he did it in his map, but here he forgot to mention that you need to RESET the variable you are using EACH TIME you wish to carry out this check. If you want to check throughout the game you have to check regularly.

For his test to work, GV1 has to be 0 before each test. The way to do this would be with an event.

Side-note: I'm very shy of Temporary Variable setting since it's only reliable for Game Variables. For other types it will reset Variable #1, but all IDs which is pure bug. :cry:

If you order the events correctly, put the reset event FIRST IN THE LIST it can fire at the same time (frequency)
Reset Event
Still have CompanyID#2
Still have CompanyID#3
...

...
Events you want to fire when a specific company is gone. Can be anything. If these are placed LOWER in the list everything can fire at the same time.




"Binary" use of variables is a bit clunky.
The number of OR tests needed is like a pyramid, more at the bottom and less at the top (thanks to </less than).

For 3 uses:
111 Test <111
11 Test#1 <11, Test#2 =/=110
1 Test#1<1, Test#2 =/=110, Test#3 =/=100

Carl Guass formula for sum of integers: (n / 2)(first number + last number).

3 uses takes (3/2)*(1+3) = 6
This is manageable, but be warned that the number of OR tests needed rises rapidly.


4 uses =10
5 uses = 15
etc. .... gets insane pretty quickly.
Post Reply