Page 29 of 32

Re: Scenario with Subs6161

Posted: 07 Nov 2006 19:36
by DaleStan
dares wrote:Can I play Scenario, which I created in Subsidiaries (rev 6161), in classic OTTD?
Exists any way to play scenario created in Subs patch in classic version of OTTD?
No and Not unless you know how to code in C, respectively.

Re: Scenario with Subs6161

Posted: 08 Nov 2006 06:48
by adpro
DaleStan wrote:
dares wrote:Can I play Scenario, which I created in Subsidiaries (rev 6161), in classic OTTD?
Exists any way to play scenario created in Subs patch in classic version of OTTD?
No and Not unless you know how to code in C, respectively.
I did not want listen it :cry:
Bad news but thanks.

Posted: 12 Nov 2006 13:48
by LordOfThePigs
Actually, that's not exactly true. Since the Subsidiaries patch does not make any changes to the savegame format, it is very possible to play games made with the subsidiaries patch in the nightlies.

However, the game might crash, throw an assertion error, or otherwise behave strangely if one of the following conditions is met:

- you have trains of company A running on company B's tracks.
- any vehicle of company A has a station of company B in it's order
- you have built stations where some parts belong to company A, and some part to company B

if none of these conditions as met, then you can probably play a subsidiaries patch game in a nightly more recent than the latest subsidiaries version.

So for examples, people that use one subsidiary for road vehicles, one subsidiary for trains, one subsidiary for airplanes etc... will probably not have any problem (unless they have built stations that meet the third condition). And as far as I know, this pattern is pretty common among people playing in single player mode.

Anyway, in the end, the best way to find out is to try.

Posted: 15 Nov 2006 15:43
by SM9T8
This patch is genius! It is exactly what I've wanted now for many years now, I've used it to create numerous 'lines' on a railway network, just to make the game more fun, and realistic, and have as yet found no problems.

Sorry If i've praised it in the wrong section of the forum, but i just wanted to thank those responsible.

Posted: 15 Nov 2006 18:18
by LordOfThePigs
Hello,

here is a version that fixes all problems that I know of.

You are all invited to test it as much as you want.

I won't post a binary yet, because I don't have time to, but I'm sure somebody can do it :)

here's a list of changes (some of them might be old changes, because my fixed bugs list isn't versioned ;) ):
  • [fixed] busses/trucks do not enter station from other subsidiaries
  • [fixed] extending the station of another subsidiary attributes the extension to the wrong company
  • [fixed] impossible to extend the station of a subsidiary with a bus/truck station
  • [fixed] Depot windows do not take subsidiaries into account at all
  • [fixed] road vehicles (and possibly other vehicles) cannot find the path to subsidiaries depots
  • [fixed] when selling a vehicle the money goes to the selling player, not the vehicle owner
  • [changed] players cannot attach their wagons to other players trains, even subsidiaries. Basically, this forbids rainbow trains.

Posted: 15 Nov 2006 22:16
by MartinA
Great!
I'll start testing it as soon as someone put up a binary (wich I knew how to do it!)

/Good work!

Martin!

Posted: 16 Nov 2006 00:55
by mart3p
I've found a bug, it's still possible to build rainbow trains.

If you have an unattached wagon in the depot, switch to a different subsidiary company, build another wagon of the same type and it will attach to the unattached wagon. Repeat this a number of times, each time switching to a different subsidiary. You can then use CTRL-drag to move all the wagons and attach them to an engine. If the first wagon belongs to the same company as the engine they will all attach.

To fix this change the function CmdBuildRailWagon at line 595 in train_cmd.c as shown:

Code: Select all

FOR_ALL_VEHICLES(w) {
	if (w->type == VEH_Train && w->tile == tile &&
			w->owner == _current_player &&               // <- add this line
			IsFreeWagon(w) && w->engine_type == engine) {
		u = GetLastVehicleInChain(w);
		break;
	}
}
MartinA: I’ve attached a win32 exe (with fix above included).

Posted: 16 Nov 2006 04:41
by LordOfThePigs
mart3p wrote:I've found a bug, it's still possible to build rainbow trains.

If you have an unattached wagon in the depot, switch to a different subsidiary company, build another wagon of the same type and it will attach to the unattached wagon. Repeat this a number of times, each time switching to a different subsidiary. You can then use CTRL-drag to move all the wagons and attach them to an engine. If the first wagon belongs to the same company as the engine they will all attach.
Wow, you are twisted :shock:

;)

Thanks for the spot and the fix. I'll post the updated patch as soon as I find time to.

Posted: 17 Nov 2006 13:17
by Moriarty
Isn't this patch ready for merging into the trunk? It's certainly had a long time to get stable and if all known bugs are fixed....

Posted: 18 Nov 2006 07:42
by LordOfThePigs
So as promised, here is the binary and language files of the latest version of the patch.

Posted: 18 Nov 2006 09:15
by Moriarty
Some bugs/issues/suggestions from the latest version:

1) Unless you know what you're looking for, it's practically impossible to know how to actually trigger the subsidiaries screen. A non-descript coloured box probably isn't the best place to hide this functionality. Couldn't you add another menu item, probably under "company leagure info", or even under the "company info" list of companies whilst also keeping the box?

2) The above mentioned non-descript toggle box for subsidiaries doesn't have a tool-top, which only serves to make things even worse. 8)

3) If you hold down shift whilst either getting or sending a $0 cash transation, it will give the error "insufficient funds" AND then close the transfer window. This is inconsistant with standard OTTD behaviour (show what would happen but don't try and transact it).

3b) Related to 3 - Using Shift-click results in the error, even if you send a sum of money you do have in your account. i.e. I tried to send 10k from a new company with 100k. Using Shift-click stated "insufficient funds".

4) On the subsidiaries screen, as it is used for the transfering of cash between accounts, it may be useful to show the amount of cash each company has on hand.

5) Would it be possible to allow pinning of the subsidiaries window?

6) Double clicking a subsidiary doesn't seem to do anything at present beyont select then deselect it. Would it be possible to make this action "administrate" the subsidiary?

7) The tooltips for cash sending/getting do not reflect the different sums that are transfered if you hold down Shift [+100k (which is non-standard behabiour)], Ctrl [double], or Alt [+10k].


That'll do for now. I might actually play a game with it later. ;-)
It certainly looks to have come a long way since last I used it. Good work. :D

Posted: 19 Nov 2006 11:07
by LordOfThePigs
Moriarty wrote:1) Unless you know what you're looking for, it's practically impossible to know how to actually trigger the subsidiaries screen. A non-descript coloured box probably isn't the best place to hide this functionality. Couldn't you add another menu item, probably under "company leagure info", or even under the "company info" list of companies whilst also keeping the box?
It used to be accessible from the company information window. Apparently it disapeared somewhere along the road, but I added it again.
Moriarty wrote:2) The above mentioned non-descript toggle box for subsidiaries doesn't have a tool-top, which only serves to make things even worse. 8)
fixed.
Moriarty wrote:3) If you hold down shift whilst either getting or sending a $0 cash transation, it will give the error "insufficient funds" AND then close the transfer window. This is inconsistant with standard OTTD behaviour (show what would happen but don't try and transact it).

3b) Related to 3 - Using Shift-click results in the error, even if you send a sum of money you do have in your account. i.e. I tried to send 10k from a new company with 100k. Using Shift-click stated "insufficient funds".
This should be fixed now.
Moriarty wrote:4) On the subsidiaries screen, as it is used for the transfering of cash between accounts, it may be useful to show the amount of cash each company has on hand.
Good idea, I implemented that.
Moriarty wrote:5) Would it be possible to allow pinning of the subsidiaries window?
Good idea again. Changed
Moriarty wrote:7) The tooltips for cash sending/getting do not reflect the different sums that are transfered if you hold down Shift [+100k (which is non-standard behabiour)], Ctrl [double], or Alt [+10k].
I fixed the tooltip, but I couldn't fix the shift button. I really want to provide the 3 possibilities to add or substract money from the amount to transfer, but there is nothing in OpenTTD that lets me detect whether alt was pressed or not, AFAIK.

Anyway, here is the new version of the patch and the binaries. There seems to be a little problem with the language files lately in the trunk, so not all of the language files could be generated, but the ones that work as included.

Posted: 19 Nov 2006 13:04
by Snuk the Great
This patch just gets nicer and nicer :D. Great work LordOfThePigs (and Moriarty for the ideas ;) )!

Posted: 20 Nov 2006 18:07
by Moriarty
On the one hand I'm impressed by the prompt solutions. On the other hand I'm going to have to go and find something else to complain about now. :D
Nice going.

Couple of other things:
- Is it necessary for them all to say (Player 1) after them on the subs screen? They are your subsidiaries thus their ownership is obvious.
Or doesn't OTTD let you "get" the company name without the player #?

- Also if you can remove that, would it still be necessary for the entire window to be so big? Because there is a lot of wasted space. A company name can only be so many characters after all (don't know the exact number) and I doubt many folks are going to be getting .
I suggest this, because, with the pin-able (which you've added) I'll probably play long stretchs with it pinned up (for ease of access), and having lots of wasted screen estate isn't good when your monitor can only handle 1024*768. ;)

- Bug - That replaced "subsidiaries" button you've put onto the Company info screen doesn't work. Clicking on it does nothing.

- Back to the send/get cash screen - Would it be possible to make it not go any higher than the money you have in the account you're trying to take it from? i.e. if I have 100k it won't let me accidentally send it up to 110k.

Trust those will help. :)

Posted: 20 Nov 2006 22:29
by ma5owat
Moriarty wrote:- Is it necessary for them all to say (Player 1) after them on the subs screen? They are your subsidiaries thus their ownership is obvious.
Or doesn't OTTD let you "get" the company name without the player #?
Well ocassionally the AI will still keep runing the company and it won't say (Player 1). I'm not sure if that still happens in the latest build or not, I've been busy building a scenerio and not playing the last week or so.

I'm not sure how or why the aI still takes controll of certain companies.

Posted: 21 Nov 2006 01:36
by LordOfThePigs
Moriarty wrote:- Is it necessary for them all to say (Player 1) after them on the subs screen? They are your subsidiaries thus their ownership is obvious.
That is not quite true in Multiplayer.
Moriarty wrote:Or doesn't OTTD let you "get" the company name without the player #?
That can be worked around, but I still would dislay the player number in multiplayer games.
Moriarty wrote:- Also if you can remove that, would it still be necessary for the entire window to be so big? Because there is a lot of wasted space. A company name can only be so many characters after all (don't know the exact number) and I doubt many folks are going to be getting .
I suggest this, because, with the pin-able (which you've added) I'll probably play long stretchs with it pinned up (for ease of access), and having lots of wasted screen estate isn't good when your monitor can only handle 1024*768. ;)
Hmm.... I can make it so that there are no less than 3 buttons that show at the same time. If there are more than 3 companies in the group, then I'd just resize the window to accomodate the fourth. I don't want to use a scrollbar, because that implies additional clicking, which is annoying when you keep switching between companies.
Moriarty wrote:- Bug - That replaced "subsidiaries" button you've put onto the Company info screen doesn't work. Clicking on it does nothing.
Oops ;) I put the button there but I forgot to code an actual behavior for it...
Moriarty wrote:- Back to the send/get cash screen - Would it be possible to make it not go any higher than the money you have in the account you're trying to take it from? i.e. if I have 100k it won't let me accidentally send it up to 110k.
Good idea since you can't transfer more than you have anyway.

Posted: 21 Nov 2006 12:23
by Moriarty
LordOfThePigs wrote: Oops ;) I put the button there but I forgot to code an actual behavior for it...
These things help. ;)


On the matter of (Player 1) I may not have been clear; I've not tried multiplayer with this, so I don't know how it works - but surely if two people create companies as well as subsidiaries, when you go to look on the "subsidiaries" screen it will only show you your own subs? Why would you want to see other subs on this list when you can't do anything with them? Hence my suggestion as to not needing (Player 1) on the subs list.
I appreciate it's necessary for the other lists.


And I like the idea of resizing with more/less companies - I didn't suggest it because I didn't think the OTTD engine could handle it being done automatically. Also I was suggesting width be shrunk a little.

Posted: 21 Nov 2006 19:33
by SSX
Other players can play as your subsidiaries in multiplayer, so this way you can see who is playing them. You still can give them money (they are, afterall, still your subsidiaries) but they are controlled by another player.

Posted: 21 Nov 2006 21:59
by MartinA
I got this message when I tried to open my last save game.

Posted: 21 Nov 2006 23:08
by Born Acorn
Do you have something readable, perhaps?