It is currently 29 Mar 2024, 07:31

WELCOME TO SIMUSCAPE!


Please Sign in or Register to enable all features, remove restrictions and gain additional access!
For information on how to bypass the CAPTCHA or to contact Team Simuscape, Continue Here!


Post a new topicPost a reply Page 1 of 1   [ 20 posts ]
Author Message
PostPosted: 25 Aug 2012, 01:44 
Moderator
User avatar

Joined: 29 Feb 2012, 00:55
Posts: 1770
Location: Hellas
[a bit of topic]
Without wanting to derail this topic, since it was again mentioned that we have the dreadful limitation of 256x4 objects, a question:
Would it be easy to have a patch to increase the number, or is it out of question due to map array or other serious limitations? I suppose memory issues do not count for hardcore players like us.
[/a bit of topic]


Top
 Offline Profile  
 
PostPosted: 25 Aug 2012, 02:36 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
athanasios wrote:
[a bit of topic]...[/a bit of topic]
Actually it's not as bad as it seems. Several of the current crop of newobject sets are national where a player would want only one to fit into a theme. Beyond that, who knows the bounds of greedy little hoarders who must have everything even though only using a small percentage.

As for adding a patch ... possible I presume, but I for one have little time or patience to compile every time a patch and/or nightly is upgraded to a new version and Lord only knows how long it takes a patch to make it into trunk, if ever. Just take a look at all the CBH stuff and nothing yet but a couple of patches that have been outpaced by subsequent OTTD nightly releases. :(

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 03:27 
Moderator
User avatar

Joined: 29 Feb 2012, 00:55
Posts: 1770
Location: Hellas
Forgive my ignorance, but I suppose such a patch (to increase the number) wouldn't be many lines long so maintenance would be easy and acceptance to trunk more probable-so no more need to update.
With the speed quast is 'spitting' new objects we may have already hit the limit.


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 05:20 
Lurker
Lurker

Joined: 06 Mar 2012, 23:12
Posts: 72
The NewObject limit may exist for an insidious reason like the NewGRF limit, and thus the devs could be loath to raise it. Raising the NewGRF limit is purported to have issues in multiplayer, for instance.


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 05:37 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Still, I think it wouldn't be bad to ask. If it causes serious issues, so be it, then it can't be done. But at least we would know.
Especially when thinking of the (hopefully) upcoming release of the Simuscape GRF, aren't there a lot of eyecandy objects in that too?
And indeed I'm also churning out a lot of new objects (the ISR-style object grf for example already uses 101 ID's and I got loads more idea's), I'm just a sucker for eyecandy ;-)


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 07:53 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Quast65 wrote:
(the ISR-style object grf for example already uses 101 ID's
Are you using the 4 view menu for these? Even though it shows 4 objects, each 4 view group counts for only one object.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 12:05 
Artists Guild Team

Joined: 02 Mar 2012, 12:10
Posts: 75
["need" for more objects-IDs]

It´s quite silly to waste valuable object-IDs by a "simple-minded" coding style, and thus make it impossible for the user to make use of more than two object newGRFs.

In fact, only different objects need different object-IDs, but not graphical variances of one and the same object.

regards
Michael


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 17:06 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
They all have 4 views... So yes, 404 different objects already in that set.

EDIT: by the way is there a way to maybe make more than 4 objects under one ID?
So for example I saw that the VASTobjects GRF has tiles that change their appearance when you keep placing the same tile on the same spot (most have 4 different appearances).
In that GRF those tiles take up an ID but have only one view. Is it therefor possible to have 4 views with 4 different appearances, thus putting 16 objects under one ID?
I guess this is done by using animationsteps, so maybe even more appearences under a view is possible? This could mean that I could make my grf's use their object-ID's even more efficient.

EDIT2: thinking of that, Michael is that the way you made the lighthouse tiles in Marico?


Top
 Offline Profile  
 
PostPosted: 26 Aug 2012, 21:26 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Quast65 wrote:
In that GRF those tiles take up an ID but have only one view. Is it therefor possible to have 4 views with 4 different appearances, thus putting 16 objects under one ID?
That sounds quite similar to what happens with engines in the Canadian train set where there can be several liveries for one engine, and before you ask, the answer is no, it is not done via a refit. You have to sell the unwanted engine and buy another one in the hopes that it will have that wanted livery.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 00:44 
Moderator
User avatar

Joined: 29 Feb 2012, 00:55
Posts: 1770
Location: Hellas
So no x8 or x16 hacking, that's bad news. :(


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 01:16 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
I think that should be possible...
I've put together this code, what it does is it puts 4 different graphics together. You can get the 4 graphics by repeated placing of the object:
Code:
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4    10 00 00 00
    1 * 16    14 "CINFOBPALS" 01 00 57 00 00
    2 * 45    08 07 "PJ" 99 00 "4 Object tiles under one ID Tutorial" 00
    " by Quast65" 00
    3 * 39    04 0F FF 01 00 "Ð4 Objects under one ID Tutorial" 00
    4 * 34    04 0F FF 01 01 "Ð4 Objects" 00
    5 * 37    00 0F 0A 01 00 08 "TU01" 09 00 D4 0A 01 D4 0B 07 0C 11 0D 0C 0E 00 00 00 00 0F 00 00 00 00
    10 04 08 17 01
    6 * 4    01 0F 04 01
    7 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 130 8 09 47 64 -31 -34
    8 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 210 8 09 47 64 -31 -34
    9 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 290 8 09 47 64 -31 -34
   10 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 466 8 09 47 64 -31 -34
   11 * 17    02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   12 * 17    02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   13 * 17    02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   14 * 17    02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5
   15 * 15    02 0F 04 80 00 00 04 00 00 01 00 02 00 03 00
   16 * 10    03 0F 01 00 01 FF 00 00 04 00


The trick is now to get multiple views (2 or 4), I'm struggeling a bit with this. Besides repeating the previous code, I guess that I'll need an extra action2 to combine them, but I'm not able to figure out just what code it needs.
Furthermore, you will get the 4 different graphics totally random with this code. Is it possible that you'll get them in a sequence?

EDIT: the GRF
Attachment:
4objtut.grf [2.57 KiB]
Downloaded 360 times


EDIT2: Looking closely at the VASTobjects GRF I saw that 8 different graphics is possible under one view, so with 4 views that would make 32 objects under one ID. Maybe it is even possible to have more under one view (16, 32, 64, etc), although that would mean a lot of repeated clicking to get the one you want ;-)


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 01:50 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
I am composing a new set of newobject tutorials to compliment the one on animations.
It will be divided into three sections:
1. A simple "one object/one item menu view" grf (As basic as it gets)
2. Adding a "two objects/two item menu view"
3. Adding a "four objects/four item menu view"

You are correct in that you will require some code to bring four views together into one menu 4 view panel.
You will also need to change property 17 in your Action0:
Code:
5 * 37    00 0F 0A 01 00 08 "TU01" 09 00 D4 0A 01 D4 0B 07 0C 11 0D 0C 0E 00 00 00 00 0F 00 00 00 00 10 04 08 17 01
"17 01" allows one view per menu panel.
"17 02" allows two.
"17 04" allows four.
There are no other combinations.

Now, what I think you are proposing is to have each of those four views (17 04) offer additional objects, either in sequence or in random. I can see no reason why this should not be possible. The only limitation is that the menu will only show one of those views. However, with the four view panels, you should be able to do this four times. So, for instance, if you have four sets of four objects (=16), the menu will display one image for each set, but by repeating the build process, the player should be able to access all 16 objects, all under one ID.

This will require some time in the laboratory where you might create a few monsters on the way to success.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 02:04 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
-Allright changing prop 17 is absolutely required.
-Changing action1 04 to 08 (for 2 views with 4 objects per view) or 16 (for 4 views with 4 objects) is also necessary.
-Then offcourse you have to add those realsprites.
-And you'll have to give all those realsprites an Action2 also.
-But now comes the tricky part. In the case of the code I just posted above, this action2:
Code:
15 * 15    02 0F 04 80 00 00 04 00 00 01 00 02 00 03 00

Does one have to add another action2 with the id's for the 4 other objects (in the case of 2 views), like this:
Code:
16 * 15    02 0F 04 80 00 00 04 04 00 05 00 06 00 07 00

Or can you just add them in the code, like this:
Code:
15 * 23    02 0F 04 80 00 00 08 00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00

-If it is needed to have two of those action2's (or 4 in the case of 4 views), do you also need another action2 to combine those action2's?
-And finally, to what ID's should the action3 refer to?


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 04:15 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
You will have an Action3 for each object ID.
You need one "Return to graphics" varAction 2 for each view.
If your menu panel will have more than 1 view (2 or 4), you will need a varAction2 to assemble the "Return to graphics" varAction2s.
Your code does not have menu sprites. (These can be the same as the object sprites but must be specified with a separate Action1).
If your menu panel will have more than 1 view (2 or 4), you will need a varAction2 to assemble the menu Action2s.
The Action3 will refer to the "Return to graphics" varAction2 or, if more than one view, then the "assemble" varAction2.
The Action3 default will be the menu Action2 or, if more than one view, then the menu's "assemble" varAction2.

Structure Summary:
Action0
Action1 for objects
real sprites (1, 2 or 4)
Action2's for object sprites
Action1 for menu
real sprites (1, 2 or 4)
Action 2's for menu sprites
varAction2 for object Return to graphics (1, 2 or 4)
If 2 or 4 views, then varAction2 to assemble Return to graphics varAction2's
If 2 or 4 views, then varAction2 to assemble menu Action2's
Action3

Repeat for each subsequent set of ID's.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 27 Aug 2012, 04:27 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
lol, you just beat me to it ;-) I just managed to get a grf with 2 views with each 4 objects (I indeed just found out that I missed a varact2 to assemble the return to graphics). Just not with a nice separate menu sprite, so I will try to incorporate that now. I'll post my code and grf's later in this post.

EDIT: Blegh! So close but no cigar... I've got 2 views with each 4 objects. Works good when placed, but there is something wrong in the menu. It only shows one of the views. So, help please ;-)
Here is the code:
Code:
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4    20 00 00 00
    1 * 16    14 "CINFOBPALS" 01 00 57 00 00
    2 * 55    08 07 "PJ" 99 00 "8 Object tiles under one ID Tutorial" 00
    " by Quast65" 00
    3 * 38    04 0F FF 01 00 "Ð8 Objects under one ID Tutorial" 00
    4 * 16    04 0F FF 01 01 "Ð8 Objects" 00
    5 * 37    00 0F 0A 01 00 08 "TU01" 09 00 D4 0A 01 D4 0B 07 0C 11 0D 0C 0E 00 00 00 00 0F 00 00 00 00
    10 04 08 17 02
    6 * 4    01 0F 08 01
    7 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 130 8 09 47 64 -31 -34
    8 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 210 8 09 47 64 -31 -34
    9 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 290 8 09 47 64 -31 -34
   10 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 466 8 09 47 64 -31 -34
   11 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 130 60 09 47 64 -31 -34
   12 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 210 60 09 47 64 -31 -34
   13 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 290 60 09 47 64 -31 -34
   14 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 466 60 09 47 64 -31 -34
   15 * 17    02 0F 00 00 8D 0F 00 00 00 80 00 80 00 00 0F 0F E5
   16 * 17    02 0F 01 00 8D 0F 00 00 01 80 00 80 00 00 0F 0F E5
   17 * 17    02 0F 02 00 8D 0F 00 00 02 80 00 80 00 00 0F 0F E5
   18 * 17    02 0F 03 00 8D 0F 00 00 03 80 00 80 00 00 0F 0F E5
   19 * 17    02 0F 04 00 8D 0F 00 00 04 80 00 80 00 00 0F 0F E5
   20 * 17    02 0F 05 00 8D 0F 00 00 05 80 00 80 00 00 0F 0F E5
   21 * 17    02 0F 06 00 8D 0F 00 00 06 80 00 80 00 00 0F 0F E5
   22 * 17    02 0F 07 00 8D 0F 00 00 07 80 00 80 00 00 0F 0F E5
   23 * 4    01 0F 02 01
   24 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 535 8 09 47 64 -31 -34
   25 c:/grfmaken/grfcodecwin/beach/objtutanim.pcx 535 60 09 47 64 -31 -34
   26 * 17       02 0F 08 00 00 80 00 80 00 00 00 00 00 00 00 00 00
   27 * 17       02 0F 09 00 00 80 00 80 00 00 00 00 00 00 00 00 00
   28 * 15    02 0F 0A 80 00 00 04 00 00 01 00 02 00 03 00
   29 * 15    02 0F 0B 80 00 00 04 04 00 05 00 06 00 07 00
   30 * 14       02 0F 0C 81 48 00 01 01 0B 00 01 01 0A 00
   31 * 14       02 0F 0D 81 48 00 01 01 09 00 01 01 08 00
   32 * 10    03 0F 01 00 01 FF 0D 00 0C 00


Looks like this in game, you can see that view two has the same menu graphic as view one, even though I have drawn 2 seperate ones... So there is something wrong with the last part of the code, but what? :?:
Attachment:
Example04.png
Example04.png [ 38.95 KiB | Viewed 11426 times ]


And ah well, as I'm asking some stuff anyway, is it possible to have the sequence not random? And if so, how?


Top
 Offline Profile  
 
PostPosted: 28 Aug 2012, 02:08 
Moderator
User avatar

Joined: 29 Feb 2012, 00:55
Posts: 1770
Location: Hellas
Bad I cannot contribute, still let me ask a question. These multiple sprites can be saved in the savegame or you will get a random sprite when you reload the game? If they can be saved then you made my day! :bowing:


Top
 Offline Profile  
 
PostPosted: 28 Aug 2012, 02:46 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Yes, it can be saved. Only when placing its random, after that it stays at where you left it.


Top
 Offline Profile  
 
PostPosted: 28 Aug 2012, 03:56 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Code:
   26 * 17       02 0F 08 00 00 80 00 80 00 00 00 00 00 00 00 00 00
   27 * 17       02 0F 09 00 00 80 00 80 00 00 00 00 00 00 00 00 00

Quast65 wrote:
So there is something wrong with the last part of the code, but what? :?:
The menu Action2's are exactly the same.
Try this:
Code:
   26 * 17       02 0F 08 00 00 80 00 80 00 00 00 00 00 00 00 00 00
   27 * 17       02 0F 09 00 01 80 00 80 00 00 00 00 00 00 00 00 00
and then post a screenshot.

Quote:
And ah well, as I'm asking some stuff anyway, is it possible to have the sequence not random? And if so, how?
Not my expertise but I would say only if it is possible to have a counter that will not reset itself every time a new newobject is built.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 28 Aug 2012, 10:09 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
[classic movie reference]
Attachment:
itsalive.jpg
itsalive.jpg [ 103.77 KiB | Viewed 11411 times ]

[/classic movie reference]

Shamefull after really showing his age, Quast65 takes off bra from head and posts the screenshot Wallyweb really referred to :lol:
Attachment:
Example05.png
Example05.png [ 51.84 KiB | Viewed 11411 times ]


Thnx! I knew the problem was something to do with an action2 ID, but couldn't figure out where I had to place it in the menu action2's. Good to know this, will help me also in other projects I need multiple menu action2's (the animated objects).

Quote:
Not my expertise but I would say only if it is possible to have a counter that will not reset itself every time a new newobject is built.

Maybe the answer lies somewhere in the way trees are built, when you pick a specific tree it always starts with the same first frame (the little tree) after that it is a bit random what combination you get when you place it multiple times on the same spot (when you make it grow), but maybe that can be unrandomized (is that a word?). I'll ask if anyone over at the openttd-forums might know.


Top
 Offline Profile  
 
PostPosted: 28 Aug 2012, 13:06 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
:lol:

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 20 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Status SimuscapeTerms of UseAbout Simuscape

Design by SAC © 2012-2015, Sweden • Powered by phpBB • Based on twilightBB by Daniel St. Jules