Page 35 of 138

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 14:26
by supermop
Hey, I've been having trouble with the improved station GUI part when using the patch pack with my modular sheds. I know my sheds are troublesome enough on their own, but it seems like a specific issue with the patch. I will post pictures and details when I get back from work.

Best,

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 14:39
by ChillCore
hthhs wrote:
ChillCore wrote: On behalf of the people using the patch, thank you.
Would you mind sharing how it is different from the previous version. (I have not yet compared the code with the previous version.)
- The code that removed passengers going via INVALID_STATION (i.e. the ones going via anywhere) has been removed - testing showed that it wasn't necessary.
- The patch no longer inadvertently disables the second pass of the MCF solver. :oops:
- Minor things (indentation and comments) that don't affect the operation of the patch.
Thank you for explaining.
No need to blush. It is from our misstakes we learn the most. ;)
MagicBuzz wrote: I'll try to find out how works the ICU library in order to make my patch "locale compliant". But I can't promise anything, I'm really underskilled in C++ and it looks like quite complex to use.

But for v11 or your patchpack, I'll merge strcmp file and strnat file, it's a good idea.
Cool.
Edit : Where is strcmp() defined ? I found it in string.h, but it's not part of the OTTD source, but Visual Studio standard includes (??)
Good question ...
I found a reference to it in core/string_compare_type.h but as there is no #include"file" there ... I said "wherever that may be" in my previous post.
Maybe it is beter to concentrate on ICU and not lose time with trying to fit the patchpack.
I suppose the code "as is" is functional and tested so I'll use it as is and revert afterwards. ;)
ColdIce wrote: 1. what is the no overload patch? :|
2. this was compatible with my savegame from previous build
3. build log http://www.heypasteit.com/clip/P6T
4. Thank you ChillCore for this patchpack :bow:
5. enjoy the win32 build guys!
1. @see CargoDist thread page 99 somewhere in the middle -> post by hthhs.
2. Yes but I am not yet sure if v11 will be with this version though. Please re-read my post when I posted the Experimental patch. (Especially the "More important notes" section.)
3. Thank you.
4. My pleasure.
5. I appreciate the effort but please remove it untill I posted v11.
I would prefer people not knowing how to fix conflicts themselves updating from v10_7 to v11 to avoid potential problems with the future versions. (If I decide to do things differently.)
The patch is experimental because a few things still need to be checked and may or may not be included in v11.
Also I hope you have not included the no_overload patch as doing so will break the savegame compatibility with v11 for everyone that has not included the patch before ... I will not (yet) include it myself for example untill I know how to remove it properly if needed. Still experimenting with saveload chunks -> CONDNULL.
Kogut wrote:
Coldice wrote: one tiny little huge problem:
in game newgrf window doesnt show the .grf list. I can`t add or remove newgrfs.
(svn r21111) -Add: Remove the buttons below the newgrf details if the list is not editable. (?)
Finally, finally, finally ... our prayers have been answered :mrgreen:
Thank you planetmaker and everyone else involved, That is THE feature of the year (if there were one).
Should I tell or not ... not?
...





svn r21116 but preparations started a bit before already.
ColdIce wrote:
Kogut wrote: <grumbling>It may be better to attach it as txt, not post on site with "you won an Ipod!" ads</grumbling>
@Kogut: it's just a banner! a small one. you can block it with adblock if you are using mozilla. the build log is for ChillCore and he didn`t complained before.
What banner?
I see no banners not there not here not anywhere so I have nothing to comlain about ... No JavaScript, no Cookies ...
OK I sacrifice a bit in browser functionalty but it does not outweigh my ads-free internet experience by far.
supermop wrote: Hey, I've been having trouble with the improved station GUI part when using the patch pack with my modular sheds. I know my sheds are troublesome enough on their own, but it seems like a specific issue with the patch. I will post pictures and details when I get back from work.

Best,
Please do.

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 15:09
by Eddi
Kogut wrote:
ColdIce wrote:one tiny little huge problem:
in game newgrf window doesnt show the .grf list. I can`t add or remove newgrfs.
(svn r21111) -Add: Remove the buttons below the newgrf details if the list is not editable. (?)
In t21134 it is impossible to change newgrfs ingame, it can be activated via openttd.cfg [newgrf_developer_tools]
you probably meant to quote this one:
svn log wrote: planetmaker * r21116 /trunk/src/ (5 files in 2 dirs): -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 15:13
by planetmaker
ColdIce wrote: in game newgrf window doesnt show the .grf list. I can`t add or remove newgrfs.
For good reason :-)

If you think that you know what you do and you read the big red warning box when changing newgrfs ingame and promise to not report crashes or problems related to newgrf from savegames tempered with in that way: set scenario_developer 1 in the console might help

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 16:44
by NekoMaster
I dont really like the idea of disabling adding\removing newgrfs ingame because sometimes people just want to test stuff or add different graphics (or when updating old games with old grfs). Should just have a option in the difficulty or advanced options (and have it set to disabled by defualt)

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 16:46
by Kogut
NekoMaster wrote:I dont really like the idea of disabling adding\removing newgrfs ingame because sometimes people just want to test stuff or add different graphics (or when updating old games with old grfs). Should just have a option in the difficulty or advanced options (and have it set to disabled by defualt)
There IS option...

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 17:02
by ColdIce
I removed the build.. I`ve readed all, but i guess i missed that line with no win32 build :P. I thought you want from us to the test the game and find bugs. sorry

@planetmaker :D thank you. with set scenario_developer 1 works.

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 19:41
by Nickel_Plate
Towns and cities are still shrinking using daylenght, have posted comment to cargodist thread.

Using r21051_v10.7

Re: Chill's patchpack v10_7

Posted: 11 Nov 2010 21:37
by ChillCore
NekoMaster wrote: I dont really like the idea of disabling adding\removing newgrfs ingame because sometimes people just want to test stuff or add different graphics (or when updating old games with old grfs). Should just have a option in the difficulty or advanced options (and have it set to disabled by defualt)
Savegames can be broken in far more ways than crashing the game even when "just" replacing grfs by their newer versions.
Wrong graphics, messed up running costs and invalid industries only being a few of the most obvious problems.

If in Advanced Settings then people that have no clue what they are doing will enable it anyway.
If I am not misstaking it can be enabled in the console also for running games if you do not want to exit the game to edit the config file.
Also before people start messing with the config file or the console they will have some experience in most cases.

For me the way it is now is perfect and really the best solution to avoid the stream of false bugreports and Devs can concentrate on the real issues instead of wasting time on user errors.

If you want the option to be on by default then just set the option in the config file and your "problem" is solved.
ColdIce wrote: I removed the build.. I`ve readed all, but i guess i missed that line with no win32 build :P. I thought you want from us to the test the game and find bugs. sorry
Thank you for understanding.

Yes, I apreciate testing and feedback a lot, I really do.
Potentially breaking the savegame of a lot of people that only download a new binary without reading the post that goes with it is another matter. ;)
eg. The changeable ingame treeline is there to fix old savegames -> If I can fix that in another way while adding less code and not adding savegamecode I will do so. That will break savegame compatibility with the experimental patch but not with v10_7 and before.
I only posted the experimental patch for MagicBuzz to have a clue what to change and where while bumping himself and for "self-compilers" to evaluate the changes already made but I was not ready yet with the next version as mentioned.

I would like to say v11 is not far away but it really depends on how fast I can check what needs to be checked, there is quite a bit, and then exporting the wanted changes to my "official folder".
Nickel_Plate wrote: Towns and cities are still shrinking using daylenght, have posted comment to cargodist thread.

Using r21051_v10.7
I see.
TOWN_GROWTH_FREQUENCY is already adjusted to the daylenght factor, seems like that is not enough.
I'll have a looksie in a bit, after checking what is already on the menu. :)

While I will be doing that ... should I look for the vehicle income also to be devided by the daylenght factor or is the higher income a "desired" effect?

Re: Chill's patchpack v10_7

Posted: 12 Nov 2010 08:10
by Kogut
ChillCore wrote:For me the way it is now is perfect and really the best solution to avoid the stream of false bugreports and Devs can concentrate on the real issues instead of wasting time on user errors.
There will be explosion of bugreports about missing feature (but it will be easier to filter).

Re: Chill's patchpack v10_7

Posted: 13 Nov 2010 10:52
by Nickel_Plate
Bit of an update on my previous reply.

Been doing a bit of testing and i may be wrong but i don't seem to be getting any town growth with a DAYLENGTH above 14.

Above 14 you can see a steady shrinkage.

Re: Chill's patchpack v10_7

Posted: 13 Nov 2010 15:45
by ChillCore
Kogut wrote:
ChillCore wrote: For me the way it is now is perfect and really the best solution to avoid the stream of false bugreports and Devs can concentrate on the real issues instead of wasting time on user errors.
There will be explosion of bugreports about missing feature (but it will be easier to filter).
Only for a little while when 1.1.0 will be released, but that number will be insignificant compared to the number of bugs reported due to changed grfs ingame in the long run.
Also the newbies will never know the option was/is there and will not miss it.
Nickel_Plate wrote: Bit of an update on my previous reply.

Been doing a bit of testing and i may be wrong but i don't seem to be getting any town growth with a DAYLENGTH above 14.

Above 14 you can see a steady shrinkage.
Thank you for the additional info.
Does the shrinkage happen for all towns or only for the ones you service?
If it happens for all towns I suspect the "error" to be in the TileLoop_Town() code -> minimum_life and time_until_rebuild.

Also if gave you some code to do some additional tests would you mind doing so and are you able to recompile?

Re: Chill's patchpack v10_7

Posted: 14 Nov 2010 15:32
by Nickel_Plate
Bit more testing.

Noticed that shrinkage seems to be faster in 2 cities where i have TRAINS & BUSES running
but slower in 2 cities with only a couple of trains arriving every so often.

Yes willing to do some testing and i can compile having just reloaded Mingw.

Re: Chill's patchpack v10_7

Posted: 14 Nov 2010 16:25
by Amaury[FR]
Hello,

I would like to know if the savegame from 1.0.4 are now compatible ?

Thx

Have Fun

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 13:32
by ChillCore
Sorry for the late reply.
Nickel_Plate wrote: Bit more testing.

Noticed that shrinkage seems to be faster in 2 cities where i have TRAINS & BUSES running
but slower in 2 cities with only a couple of trains arriving every so often.
Honestly I have no clue why the frequency of vehicles moving around has an effect on town growth ... I will need to do some digging.
Yes willing to do some testing and i can compile having just reloaded Mingw.
Much apreciated.
As I mentioned before the TOWN_GROWTH_FREQUENCY was already increased by the daylength factor which makes them grow slower.
The rebuilding of houses was not yet modified so expanding and shrinking are unbalanced.
Do the changes mentioned below improve the situation?
Note that this in new territory for me and you should not overwrite your longlasting savegames as I did not test these changes.
Also note that the last line increases the time the exclusive rights last and will most likely not influence town growth.

Code: Select all

In house.h:
----------
around line 122:
-	byte minimum_life;
+	uint16 minimum_life;

In town_cmd.cpp:
----------------
Around line 575:
	if ((hs->building_flags & BUILDING_HAS_1_TILE) &&
			HasBit(t->flags, TOWN_IS_FUNDED) &&
			CanDeleteHouse(tile) &&
-			GetHouseAge(tile) >= hs->minimum_life &&
+			GetHouseAge(tile) >= (hs->minimum_life * _date_daylength_factor) &&
			--t->time_until_rebuild == 0) {
		t->time_until_rebuild = GB(r, 16, 8) + 192;

Around line 1454:
-	t->time_until_rebuild = 10;
+	t->time_until_rebuild = 10 * _date_daylength_factor;

Around line 2611:
-		t->exclusive_counter = 12;
+		t->exclusive_counter = 12 * _date_daylength_factor;
Most likely there is more code that needs adjusting to the daylength factor.
Amaury[FR] wrote: Hello,

I would like to know if the savegame from 1.0.4 are now compatible ?

Thx

Have Fun
Savegames from 1.0.4 should be compatible.
However there are a few coop_savegamesgames that crash upon loading in the patchpack.
These crashes seem to be caused by the company's headquarter somehow as after removal of the HQ (in clean OpenTTD) I can load them just fine.
I have not yet found where things go wrong.

Can you please remove the HQ from the savegame and try again to see if that fixes it.
You may also post your savegame if you want me to check if this is the cause.

Edit:
Corrected spelling errors ... thanks htths.
/me needs an english spell checker and glasses. lol

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 14:49
by Nickel_Plate
Getting these errors when compiling.

[SRC] Compiling thread/thread_win32.cpp
[SRC] Compiling tile_map.cpp
[SRC] Compiling tilearea.cpp
[SRC] Compiling timetable_cmd.cpp
[SRC] Compiling timetable_gui.cpp
[SRC] Compiling toolbar_gui.cpp
[SRC] Compiling town_cmd.cpp
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp: In function 'void TileLoop_Town(TileIndex)':
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp:575:45: error: '_date_daylenght_factor' was not declared in this scope
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp: In function 'void DoCreateTown(Town*, TileIndex, uint32, TownSize, bool, TownLayout, bool)':
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp:1454:31: error: '_date_daylenght_factor' was not declared in this scope
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp: In function 'Command Cost TownActionBuyRights(Town*, DoCommandFlag)':
C:/MinGW/msys/1.0/home/Cyril/trunk_r21125/src/town_cmd.cpp:2610:31: error: '_date_daylenght_factor' was not declared in this scope
make[1]: *** [town_cmd.o] Error 1
make[1]: Leaving directory `/usr/home/Cyril/trunk_r21125/objs/release'
make: *** [all] Error 1

Cyril@office-one ~/trunk_r21125
$

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 15:10
by ChillCore
Add #include "date_type.h" to the top of town_cmd.cpp.
I assumed the file would be included because date_func.h was already there and date_type.h is included in that file ... My bad.

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 15:35
by Nickel_Plate
Still getting the same errors.

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 16:03
by hthhs
Try replacing

Code: Select all

_date_daylenght_factor
with

Code: Select all

_date_daylength_factor
in town_cmd.cpp wherever it occurs.

Re: Chill's patchpack v10_7

Posted: 16 Nov 2010 16:15
by Nickel_Plate
:oops: :oops: :oops: