[patch]Picking and placing single houses
Moderator: OpenTTD Developers
Re: [patch]Picking and placing single houses in scenario edi
Confirmed and fixed (it was a false-positive).
- Attachments
-
- fix-house-placing-uninitilaized-warning.diff
- (802 Bytes) Downloaded 205 times
don't worry, be happy and checkout my patches
Re: [patch]Picking and placing single houses in scenario edi
Great work so far guys!
Unfortunately it's still quite unworkable because most buildings can't be placed in the areas I want them to.
Would it be possible to remove all the restrictions on placing buildings?
And it seems the game crashes a lot when using eyecandy as well in the map editor ...
Attached the error code.
Unfortunately it's still quite unworkable because most buildings can't be placed in the areas I want them to.
Would it be possible to remove all the restrictions on placing buildings?
And it seems the game crashes a lot when using eyecandy as well in the map editor ...
Attached the error code.
- Attachments
-
- crashes.txt
- (8.24 KiB) Downloaded 202 times
Re: [patch]Picking and placing single houses in scenario edi
I'm working on it. In the next version I'll give possibility to ignore the town zones when placing houses. Also I'll allow to check what's the town zone on a given tile.Whopper wrote:Unfortunately it's still quite unworkable because most buildings can't be placed in the areas I want them to.
Another thing I'm planning is to give some extra information to CBID_HOUSE_CONSTRUCTION NewGRF callback (this callback decides whether a house can be placed on a given tile). The information will tell whether the house is being placed manually or not. NewGRF makers are sometimes quite restrictive on house location and the callback frequently disallows a house to be built. This approach is required to control town layouts while they grow. However, manual placement is something different and the callback should be less restrictive. Unfortunately you will have to wait a bit for this feature - the patch must get into the trunk (if ever) and GRF makers must update their town sets.
don't worry, be happy and checkout my patches
Re: [patch]Picking and placing single houses in scenario editor
oberhümer wrote:Minor update to r27356. And an uninitialized variable warning...
There is a bug in the patch from oberhümer. It reveals itself when you open booth the "place object" tool and the "place house" tool - just don't do thisWhopper wrote:And it seems the game crashes a lot when using eyecandy as well in the map editor ...
Attached the error code.
http://www.tt-forums.net/download/file.php?id=186856
Basically the "place object" window couldn't coexist with "place house" window before. I'm aware of a recent change in the trunk about the "place object" window (it's not a PickerWindowBase anymore) and that's probably the cause of the problems.
EDIT: it's actually a trunk bug, not related to the patch
New version of the patch (I'm working on it) should be just fine.
don't worry, be happy and checkout my patches
Re: [patch]Picking and placing single houses in scenario editor
I am considering merging this patch into my fork. Do you have a public repository with your code, other than the patch sequence attached to the first post in this thread? Otherwise, what author information should I use for your code? (Git requires a valid e-mail address for the author of a commit.)
Re: [patch]Picking and placing single houses in scenario editor
No, I don't have a public repository. But you can use this address: "adf88[obvious character]interia.pl"
don't worry, be happy and checkout my patches
Re: [patch]Picking and placing single houses in scenario editor
Thank you. Note that your address will appear (unobfuscated) in my public repository. Is this fine with you?
Re: [patch]Picking and placing single houses in scenario editor
That's OK.
don't worry, be happy and checkout my patches
Re: [patch]Picking and placing single houses in scenario editor
I have merged this patch into my branch; details here. I decided to only add the ability to build houses from the scenario editor, and not from a game script, for the time being, and to lift some building restrictions, such as town zones. I also had to rewrite some parts of the code due to divergences between openttd revision 26400 (against which your latest patch was created) and current trunk, and then between openttd trunk and my branch. Still, most of the work is yours, and I wanted to commend you for such a nicely written patch.
There are some issues I found during review, in case you want to fix them in a future version of your patch:
There are some issues I found during review, in case you want to fix them in a future version of your patch:
- In patch 230, file src/terraform_gui.cpp, hunk 5I think that there is a typo and "WC_SELECT_STATION" should be "WC_SELECT_TOWN". (Note however that openttd trunk has changed the object selection window to a standalone window, so you may want to do the same for the house selection window as I did.)
Code: Select all
@@ -711,6 +726,8 @@ this->RaiseButtons(); this->SetDirty(); DeleteWindowById(WC_BUILD_OBJECT, 0); + DeleteWindowById(WC_BUILD_HOUSE, 0); + DeleteWindowById(WC_SELECT_STATION, 0); } static HotkeyList hotkeys;
- The town selection window is not properly invalidated when towns are created or removed; doing so in the editor while the window is open may lead to weird strings displayed or even crashes.
- Sprite offsets in the default house set are not applied correctly when drawing in the selection window; this is most noticeable with statues. Also, GUI zoom seems to be ignored; look here for how I modified DrawOldHouseTileInGUI.
- openbu.org
- Engineer
- Posts: 74
- Joined: 14 Nov 2014 07:40
- Location: USA
- Contact:
Re: [patch]Picking and placing single houses in scenario editor
Great.
place houses manually in multiplay games.
- Attachments
-
- f.png (25.94 KiB) Viewed 7873 times
- Streckenläufer
- Engineer
- Posts: 57
- Joined: 22 Jun 2012 14:45
- Location: Berlin-Germany
Re: [patch]Picking and placing single houses in scenario editor
WC_SELECT_TOWN gives a crash, when clicking on ... see picture
WC_SELECT_STATION is ok.
WC_SELECT_STATION is ok.
- Attachments
-
- house_error.jpg (21.36 KiB) Viewed 7843 times
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
- Streckenläufer
- Engineer
- Posts: 57
- Joined: 22 Jun 2012 14:45
- Location: Berlin-Germany
Re: [patch]Picking and placing single houses in scenario edi
Hello adf88 is already canceled this dependence?adf88 wrote:I'm working on it. In the next version I'll give possibility to ignore the town zones when placing houses. Also I'll allow to check what's the town zone on a given tile.
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
Re: [patch]Picking and placing single houses in scenario editor
Yes, new version is almost ready. Grab an unofficial alpha if you wish.
- Attachments
-
- hp.zip
- (62.38 KiB) Downloaded 192 times
don't worry, be happy and checkout my patches
- Streckenläufer
- Engineer
- Posts: 57
- Joined: 22 Jun 2012 14:45
- Location: Berlin-Germany
Re: [patch]Picking and placing single houses in scenario editor
Hello adf88,
did everything meticulously applied by hand, get the following error.
town_land.h line: 2276? (see Appendix)
did everything meticulously applied by hand, get the following error.
town_land.h line: 2276? (see Appendix)
- Attachments
-
- town_land_h.jpg (57.8 KiB) Viewed 2025 times
-
- town_land_h_compile.jpg
- (391.62 KiB) Not downloaded yet
-
- town_land_h_2.jpg (48.43 KiB) Viewed 2025 times
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!
Re: [patch]Picking and placing single houses in scenario editor
OK, now my compiler is sensitive to narrowing conversions and I did remove the issue.
// EDIT
Something went wrong with the upload. The file is updated now.
// EDIT
Something went wrong with the upload. The file is updated now.
- Attachments
-
- hp.zip
- House placing v4 alpha3 OpenTTD r27523
- (64.56 KiB) Downloaded 202 times
Last edited by adf88 on 25 Mar 2016 06:27, edited 1 time in total.
don't worry, be happy and checkout my patches
-
- Engineer
- Posts: 19
- Joined: 25 Mar 2016 01:26
- Location: Netherlands....
Re: [patch]Picking and placing single houses in scenario editor
On what version do i have to apply thepatch?
I would love the custom house placing and funding options...
version=r27356?
And can someone tell me where i can get the correct version? and how to apply the diffs to it.. (ubuntu 14.04 r higher)
Compiling from source works ok but i cant download the correct version and cause of that i cant apply the diff correctly
And yes i saw these links:
https://wiki.openttd.org/Compiling_on_( ... install_it
i can apply the diffs (above this post) to 27525 but then i have the problem that i dont see any houses... and the windows of house placing works but there is no button showing up in it
Does this patch get injected in the main version in the future?
I would love the custom house placing and funding options...
version=r27356?
Code: Select all
svn update -r 27356
Skipped '.'
Summary of conflicts:
Skipped paths: 1
And can someone tell me where i can get the correct version? and how to apply the diffs to it.. (ubuntu 14.04 r higher)
Compiling from source works ok but i cant download the correct version and cause of that i cant apply the diff correctly
And yes i saw these links:
https://wiki.openttd.org/Compiling_on_( ... install_it
i can apply the diffs (above this post) to 27525 but then i have the problem that i dont see any houses... and the windows of house placing works but there is no button showing up in it
Does this patch get injected in the main version in the future?
Re: [patch]Picking and placing single houses in scenario editor
r27523 but 27525 should be fine too. Make sure you cleaned up everything correctly. Also have in mind that this is just a "work in progress". Official release will be soon (download at front page of this thread).
don't worry, be happy and checkout my patches
-
- Engineer
- Posts: 19
- Joined: 25 Mar 2016 01:26
- Location: Netherlands....
Re: [patch]Picking and placing single houses in scenario editor
27523 works but while compiling i got these errors
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
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[] = {
^
Re: [patch]Picking and placing single houses in scenario editor
Are savegames made with this patch compatible with trunk?
-
- Engineer
- Posts: 19
- Joined: 25 Mar 2016 01:26
- Location: Netherlands....
Re: [patch]Picking and placing single houses in scenario editor
so far as i know yes... there were some scenarios that were compatible... but ur world gets really fast messed up if you dont change the grow settings of a city to no growth...Leanden wrote:Are savegames made with this patch compatible with trunk?
Who is online
Users browsing this forum: Bing [Bot] and 5 guests