Page 2 of 4

Posted: 23 Jan 2007 13:40
by eis_os
Some questions:

Should the objects have some kind of size selection?
Should be there some kind of enable/disable thing to have certain flags.

Could be generally be used at action2 level to do some kind of tasks, like selecting an alternate layout... Not sure yet...

Posted: 23 Jan 2007 16:59
by wallyweb
eis_os wrote:Should the objects have some kind of size selection?
Do you mean selectable size as with train stations? This could be useful depending upon what the nature of the objects will be.
eis_os wrote:Should be there some kind of enable/disable thing to have certain flags.
If these are for eye candy, what would need enabling/disabling? Perhaps restrictions on placements such as "town zone 0" or "close to water" etc.
eis_os wrote:Could be generally be used at action2 level to do some kind of tasks, like selecting an alternate layout... Not sure yet...
The answers to these questions would depend upon what objects people envision as desirable. Items such as lighthouses, communication towers and transmission towers only require one tile. The transmission tower could be flagged for orientation, i.e. will the lines run north-south or east west. Would a special tower be required to describe a line that changes from one direction to another?

What other types of objects would people find useful? Will newobjects be limited to eye candy which basically has no function other than to add realism to a layout?

Posted: 23 Jan 2007 17:03
by Dave
For me "draggable" items would be useful (especially say if you wanted to create something like a disused marshalling yard with an object that is basically rusty track.

eis_os is da man though, so it's up to him what he puts in.

I'd be using it for realism, yes. That was all we were implementing it for wasn't it?

Posted: 23 Jan 2007 19:04
by eis_os
Rusty rails should be handled in newroutes, as non rail objects these would be really bad... I don't think drop down support will be in.

So I guess some kind of size selection should be in...

Posted: 23 Jan 2007 21:02
by minime
Definitely some means of size selection, especially since you're planning to allow various sizes of objects to be created.

Additionally, I think it would be useful to add some means of entering some additional information (say for minor tweaks of a particular object). Say a few buttons labelled A, B, C,... the state of which (maybe one bit per button?) would then be stored in with the object and accessible in action 2 via variable. In fact a system like this could be useful with stations as well. For one, it could let us eliminate all the North/South versions of buffers, as well as reduce the number of classes taken by small variations of basically the same layout.

Could it be possible to control drawing of foundations, and detect land type (var 60) as it is for industry tiles?

minime

Posted: 23 Jan 2007 21:08
by DaleStan
For stations, anything the user can select must be a separate class internally. Separate entries in the dropdown may not be the best way to do this, but it does the trick, and it's simpler than trying to add a second "variant 1/2/3/4" dropdown. I suspect that objects will behave the same way.

Posted: 24 Jan 2007 08:53
by eis_os
Thats not 100% true, the user can select aswell the orientation.

For me I think it would be easier to have a fixed size of object, however make the object rotateable. And allow to select some extra flags...

For most objects I guess there we will be anyway only one size to select.
Or a selection in one direction, this means you can change the width of an object.

Posted: 24 Jan 2007 16:23
by wallyweb
eis_os wrote: ... however make the object rotateable. And allow to select some extra flags...
Hmm ... very interesting :)
eis_os wrote:For most objects I guess there we will be anyway only one size to select.
Or a selection in one direction, this means you can change the width of an object.
How are you referencing width? Number of tiles? Would this also be possible for depth? As in a 2x2 graphic?

Posted: 24 Jan 2007 18:09
by eis_os
The real question what is doable, I don't think I can support different sizes per object id. (Simple from the massive time to fix all it's bugs)

I still try to fight against TTD(Patch) TextID system which eats a lot time currently...

Posted: 24 Jan 2007 20:10
by wallyweb
eis_os wrote:The real question what is doable, I don't think I can support different sizes per object id. (Simple from the massive time to fix all it's bugs)
Probably the simplest way is the best which is to limit size to one tile. Currently available objects (lighthouse, communication towers, light pole, transmission tower) are only one tile. Other objects might be statues, road signs, special landscaping, etc. which should be easily accommodated with single tiles. If players want a grouping they can place similar objects next to each other. We must keep in mind that these objects are non-functional to the actual game and serve mainly to dress up the landscape a bit. They could allow for a limited animation similar to the flashing light on the lighthouse. Am I being too simplistic here? Do these really need to be more complicated?

Posted: 24 Jan 2007 20:14
by eis_os
I haven't say they must be limited to 1x1 but one id is limited to one size, say, if you have 3x2 building, you can't have a 3x5 one ..

Posted: 24 Jan 2007 20:38
by wallyweb
eis_os wrote:I haven't say they must be limited to 1x1 but one id is limited to one size, say, if you have 3x2 building, you can't have a 3x5 one ..
One size per ID sounds good. I can't think of any reason why someone would want more.

Posted: 25 Jan 2007 18:01
by eis_os
Hmm, it would be nice if someone could build two test grfs with some action0s for objects (the wiki):

Setting a class with textid and without one.
Reusing a class in a other grf, with textid and without.
Setting a textid or not in an object.

This should test if a class can be reused and if the code won't crash internally when a text id is not set. And if my class system does work.
(It would be nice if the texts could have grf filenames mentioned in it, and what objectid in the filename it has. )

PS: This is for writing the window selecting code.

Posted: 29 Jun 2007 10:34
by wallyweb
Oskar, is your code currently advanced enough so that the lighthouse, communication tower and rock tile could be added to the new objects window for use during a game?

Perhaps if these were done first, it would encourage folks to contribute other objects for use in this feature.

Re: Newobjects - Thoughts and Suggestions

Posted: 15 Apr 2009 01:55
by wallyweb
We have an update ... Thanks to Lakie's hard work and persistence, newobjects now works as intended. Please watch here for a demo grf very soon.

And now a word from Lakie about what was accomplished: :D

Re: Newobjects - Thoughts and Suggestions

Posted: 15 Apr 2009 02:17
by Lakie
Considering this thread is two years old and I only worked on newobjects, I guess under a year ago.
NewObjects has been finished for quite some time, though a gui to access it in the scenario editor is missing, though I think there was a cheat to bring it up.

The only recent work on it was fixes support of the bit 5 (don't draw foundations) which previously crashed due to some stupidity on my part.
And the addition of proper support with auto slope, although I don't fully understand auto slope so there might be some issues with it.

[Edit] Something I might add sometime is native support for 2cc, allowing TTDpatch to do all the work around picking the correct colour mapping to apply to the objects sprites.

~ Lakie

Re: Newobjects - Thoughts and Suggestions

Posted: 15 Apr 2009 04:25
by Lakie
I figured I'd take a bash at it since I was feeling on a roll and figured it shouldn't be too difficult.
So this is a taste of things to come assuming I don't completely break the drawing routines whilst testing.

Primary colour - Blue, No secondary colour.
2cc object blue.png
2cc object blue.png (27.3 KiB) Viewed 5360 times
Primary colour - Green, secondary colour - Pink.
2cc object green-pink.png
2cc object green-pink.png (27.38 KiB) Viewed 5358 times
Primary colour - Yellow, secondary colour - Green.
2cc object yellow-green.png
2cc object yellow-green.png (27.36 KiB) Viewed 5359 times
~ Lakie

Re: Newobjects - Thoughts and Suggestions

Posted: 15 Apr 2009 11:54
by Xander
Awesome news! Can't wait for the eye-candy newGRFs to come out :D

Re: Newobjects - Thoughts and Suggestions

Posted: 15 Apr 2009 18:25
by Lakie
Added support for 2cc on objects (object flag 0x100), as well as fixing some misc bugs with removing objects both in game and in the scenario editor.

In the scenario editor, the preview of the object is always dark blue with pale green.
The objects will be given two random colours to use, because of this older saves with scenario built objects will most likely come back as dark blue all the time.
(I don't think this is a major problem though as no publically available objects exist).

[Edit] I don't think it'd be too hard to port the code to stations assuming they don't support 2cc already. (Though this is something to do over summer).

~ Lakie

Re: Newobjects - Thoughts and Suggestions

Posted: 16 Apr 2009 15:11
by ISA
Nice to see progress in new objects. Sad that my laptop is in repairs, there I did have some sprites what could be implemented into new objects!
Keep up Your good work Lakie!