[patch]Picking and placing single houses

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

b1tm4rx1st wrote:27523 works but while compiling i got these errors

Code: Select all



[/In file included from /openttd/src/saveload/oldloader_sl.cpp:36:0:
/openttd/src/saveload/../table/townname.h:1840:29: warning: ‘_name_czech_subst_stem’ defined but not used [-Wunused-variable]
 static const CzechNameSubst _name_czech_subst_stem[] = {
                             ^
/openttd/src/saveload/../table/townname.h:1893:29: warning: ‘_name_czech_subst_ending’ defined but not used [-Wunused-variable]
 static const CzechNameSubst _name_czech_subst_ending[] = {
                             ^
Have you tried compiling without the patch? These warnings seems unrelated to the patch.

b1tm4rx1st wrote:And when im in game and want to start a new scenario ive got the error there is no space for placing some towns xD
Can you upload this scenario?
Leanden wrote:Are savegames made with this patch compatible with trunk?
Yes.
:] don't worry, be happy and checkout my patches
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

I cant give u the save game... cause of the scenario wont start of the lost space for houses and towns... ("new game" button from homescreen) The red error msg windows does show up with the text: "Map generation aborted... No Suitable town locations"

If i start a clean scenario in the scenario editor i can make cities without houses... only a road layout show up when creating a town... Want that one uploaded to this reply?
down here the failure of the 222 diff

Code: Select all

b1t@m4rx1st:~/openttd$ patch -p1 < /home/b1t/Desktop/New\ Folder/222-gui-tool-for-placing-houses.diff 
patching file projects/openttd_vs100.vcxproj
patching file projects/openttd_vs100.vcxproj.filters
patching file projects/openttd_vs140.vcxproj
patching file projects/openttd_vs140.vcxproj.filters
patching file projects/openttd_vs80.vcproj
patching file projects/openttd_vs90.vcproj
patching file source.list
patching file src/house.h
Hunk #1 FAILED at 149.
1 out of 1 hunk FAILED -- saving rejects to file src/house.h.rej
patching file src/lang/english.txt
Hunk #1 succeeded at 2486 with fuzz 2 (offset -5 lines).
patching file src/script/api/game/game_window.hpp.sq
Hunk #1 succeeded at 90 (offset -1 lines).
Hunk #2 FAILED at 1254.
1 out of 2 hunks FAILED -- saving rejects to file src/script/api/game/game_window.hpp.sq.rej
patching file src/script/api/script_window.hpp
Hunk #1 succeeded at 454 (offset -6 lines).
Hunk #2 succeeded at 2480 with fuzz 1 (offset -13 lines).
patching file src/script/api/template/template_window.hpp.sq
Hunk #1 FAILED at 235.
1 out of 1 hunk FAILED -- saving rejects to file src/script/api/template/template_window.hpp.sq.rej
patching file src/town.h
patching file src/town_cmd.cpp
patching file src/town_gui.cpp
Hunk #3 succeeded at 305 with fuzz 2 (offset -903 lines).
Hunk #4 succeeded at 1867 with fuzz 2 (offset -110 lines).
patching file src/town_gui.h
patching file src/widgets/town_widget.h
Hunk #1 succeeded at 62 with fuzz 1 (offset -7 lines).
patching file src/window_type.h
Hunk #1 succeeded at 371 (offset -6 lines).

after clean ubuntu install got these compile errors now

Code: Select all

/home/b1t/openttd/src/town_cmd.cpp: In destructor ‘Town::~Town()’:
/home/b1t/openttd/src/town_cmd.cpp:77:19: error: ‘WC_SELECT_TOWN’ was not declared in this scope
  DeleteWindowById(WC_SELECT_TOWN, 0);
                   ^
/home/b1t/openttd/src/town_cmd.cpp: In function ‘CommandCost CmdRenameTown(TileIndex, DoCommandFlag, uint32, uint32, const char*)’:
/home/b1t/openttd/src/town_cmd.cpp:2874:18: error: ‘WC_SELECT_TOWN’ was not declared in this scope
   SetWindowDirty(WC_SELECT_TOWN, 0); // only repaint this window even thought it may be too narrow for the new name
                  ^
Makefile:234: recipe for target 'town_cmd.o' failed
make[1]: *** [town_cmd.o] Error 1
make[1]: Leaving directory '/home/b1t/openttd/objs/release'
Makefile:56: recipe for target 'all' failed
make: *** [all] Error 1
Attachments
rejections.zip
Rejections of the diffs
Hunks failed
(1.18 KiB) Downloaded 175 times
Screenshot_2016-03-26_05-39-54.png
Screenshot of the scenario editor without houses and a not working placing window
(1.29 MiB) Not downloaded yet
stillnotworking.scn
The scenario of the screenshot
(6.36 KiB) Downloaded 164 times
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch]Picking and placing single houses in scenario editor

Post by Leanden »

Not to be lazy or incompetant, but im in another computer miles from my home computer with my patch compiler, do you have a Win32 compiled build?

Thanks,
Image
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

Leanden wrote:Not to be lazy or incompetant, but im in another computer miles from my home computer with my patch compiler, do you have a Win32 compiled build?

Thanks,
Both.... and same problems
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

b1tm4rx1st wrote:down here the failure of the 222 diff...
Patches should apply cleanly. You are doing sth wrong.

Try this to check if openttd works at all:

Code: Select all

svn -r 27523 co 'svn://openttd.org/trunk' houseplacing
cd houseplacing
./configure
make run
Then apply the patch and test again:

Code: Select all

wget 'http://www.tt-forums.net/download/file.php?id=190240' -O patches.zip
mkdir -p patches
unzip -o patches.zip -d patches
cat patches/* | patch -p1
./configure
make run
:] don't worry, be happy and checkout my patches
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

adf88 wrote:
b1tm4rx1st wrote:down here the failure of the 222 diff...
Patches should apply cleanly. You are doing sth wrong.

Try this to check if openttd works at all:

Code: Select all

svn -r 27523 co 'svn://openttd.org/trunk' houseplacing
cd houseplacing
./configure
make run
Then apply the patch and test again:

Code: Select all

wget 'http://www.tt-forums.net/download/file.php?id=190240' -O patches.zip
mkdir -p patches
unzip -o patches.zip -d patches
cat patches/* | patch -p1
./configure
make run
Step 1 works... yes

Step 2 same problems
checkout the earlier posted screenshot...
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

b1tm4rx1st wrote:Step 1 works... yes

Step 2 same problems
checkout the earlier posted screenshot...
You mean no houses available? Indeed, there was an issue and I fixed it. Did you have any errors/warnings during compiling or applying patches?

House placing is now under toolbar "Town" button. Houses can be placed also from in-game but you have to enable house placing in settings (Environment->Towns). Feedback welcome.
hp.png
hp.png (9.82 KiB) Viewed 6729 times
Attachments
hp.zip
House placing v4 alpha4 OpenTTD r27525.
(63.8 KiB) Downloaded 192 times
:] don't worry, be happy and checkout my patches
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

adf88 wrote:
b1tm4rx1st wrote:Step 1 works... yes

Step 2 same problems
checkout the earlier posted screenshot...
You mean no houses available? Indeed, there was an issue and I fixed it. Did you have any errors/warnings during compiling or applying patches?

House placing is now under toolbar "Town" button. Houses can be placed also from in-game but you have to enable house placing in settings (Environment->Towns). Feedback welcome.
hp.png

As far i can check it out now... It works :) no errors anymore...


Is it possible to keep the town complete in tact as build in scenario for years.... ?
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

No. But you can build while paused.
:] don't worry, be happy and checkout my patches
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

In game there r still zoning problems... In scenario editor works all fine...
In game there appear sometimes an error that you want to far from the city... but im really clicking inside of the town
adf88 wrote:No. But you can build while paused.
Feedback:

* it would be nice there was a function to turn off the auto maintain function of a town... Or a function the user can fully maintain the town....
* It would be nice the price of buildings can me set to Low to extreme high...
* it would be nice the custom place method has a optional option to overwrite a existing building.


I like this patch freaking much :)

Edit: i would be nice there was a possibility to build more then one stadium per town or things like that...
Last edited by b1tm4rx1st on 31 Mar 2016 05:43, edited 1 time in total.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch]Picking and placing single houses in scenario editor

Post by Leanden »

b1tm4rx1st wrote:In game there r still zoning problems... In scenario editor works all fine...
In game there appear sometimes an error that you want to far from the city... but im really clicking inside of the town
adf88 wrote:No. But you can build while paused.
Feedback:

* it would be nice there was a function to turn off the auto maintain function of a town... Or a function the user can fully maintain the town....
* It would be nice the price of buildings can me set to Low to extreme high...
* it would be nice the custom place method has a optional option to overwrite a existing building.


I like this patch freaking much :)
From memory there is a setting to disable town growth, alternatively you could make a script to do this.
Image
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

Leanden wrote:
b1tm4rx1st wrote:In game there r still zoning problems... In scenario editor works all fine...
In game there appear sometimes an error that you want to far from the city... but im really clicking inside of the town
adf88 wrote:No. But you can build while paused.
Feedback:

* it would be nice there was a function to turn off the auto maintain function of a town... Or a function the user can fully maintain the town....
* It would be nice the price of buildings can me set to Low to extreme high...
* it would be nice the custom place method has a optional option to overwrite a existing building.


I like this patch freaking much :)
From memory there is a setting to disable town growth, alternatively you could make a script to do this.
true :) but he asked for feedback.. =)
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch]Picking and placing single houses in scenario editor

Post by Leanden »

Would be nice if this feature was available in scenario editor (apologies if it already is :D )
Image
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

Leanden wrote:Would be nice if this feature was available in scenario editor (apologies if it already is :D )
in scenario stays all in tact... when u play the game ur city get messed up within 1 hour... also if you turn of city grow...

This makes the patch UN-usable for me :oops:
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

:] don't worry, be happy and checkout my patches
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: [patch]Picking and placing single houses in scenario editor

Post by b1tm4rx1st »

Awesome! gonna check it out today
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch]Picking and placing single houses in scenario editor

Post by Leanden »

Ive now managed to test this out and there 2 things i feel that could be added.

1) Show normal OTTD houses even if NewGRF is loaded. (Some NewGRF call on original graphics which arent shown in the housebuilder, UK Tai is an example)

2) Disable House Zoning. The 1-5 zone is a nice feature for controlling how the computer grows a city, but when placing houses manually it isnt intuitive as you cant see where the zones are. (EDIT: Its a wonderful patch, but i cant place any houses where i want them!!, stupid zoning).
Image
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

b1tm4rx1st wrote:In game there appear sometimes an error that you want to far from the city... but im really clicking inside of the town
A screenshot or a save game and a screenshot would helpful. Otherwise I have no clue what could happen.
b1tm4rx1st wrote:It would be nice the price of buildings can me set to Low to extreme high
It's somehow possible... Basically all prices in the game can be adjusted via a GRF. BaseCosts GRF is one of such. However, until it gets updated it won't be capable of handling house prices. Anyway, adjustable house prices is not a matter of this patch.
Leanden wrote:1) Show normal OTTD houses even if NewGRF is loaded. (Some NewGRF call on original graphics which arent shown in the housebuilder, UK Tai is an example)
UK Tai seems working all OK. Could you be more specific? Anyway, if original houses are turned off by some GRF, they are turned off. All you can do is to change the house set. Some GRFs have an option for keeping original houses.
Leanden wrote:2) Disable House Zoning. The 1-5 zone is a nice feature for controlling how the computer grows a city, but when placing houses manually it isnt intuitive as you cant see where the zones are. (EDIT: Its a wonderful patch, but i cant place any houses where i want them!!, stupid zoning).
For excessive town building there is scenario editor where the limit is turned off. In-game house placing is meant rather for sporadic building.
When it's about "seeing" the zones, you can move the cursor over town tiles and the zone will get highlighted (1 2 3 4 5 in the house picker window). Is the highlighting visible enough? Perhaps more contrast is needed... You can also ctrl+click while placing a house to open a dialog which will show the zone.
:] don't worry, be happy and checkout my patches
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [patch]Picking and placing single houses in scenario editor

Post by Leanden »

adf88 wrote:
Leanden wrote:2) Disable House Zoning. The 1-5 zone is a nice feature for controlling how the computer grows a city, but when placing houses manually it isnt intuitive as you cant see where the zones are. (EDIT: Its a wonderful patch, but i cant place any houses where i want them!!, stupid zoning).
For excessive town building there is scenario editor where the limit is turned off. In-game house placing is meant rather for sporadic building.
When it's about "seeing" the zones, you can move the cursor over town tiles and the zone will get highlighted (1 2 3 4 5 in the house picker window). Is the highlighting visible enough? Perhaps more contrast is needed... You can also ctrl+click while placing a house to open a dialog which will show the zone.

Thanks for that, how do i turn the limit off in scenario editor as right now this is where im seeing the zone restrictions.
Image
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch]Picking and placing single houses in scenario editor

Post by adf88 »

You don't have to, zone limit just does not apply in the editor (in the latest patch which is v4 currently). You can also place other houses that normally would be disallowed: obsolete and feature houses, snowy houses on non-snowy area and vice-versa, historical buildings.
:] don't worry, be happy and checkout my patches
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 1 guest