.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   110 Image Limit... megamod anyway? (http://forum.shrapnelgames.com/showthread.php?t=33226)

DrPraetorious February 8th, 2007 02:40 AM

110 Image Limit... megamod anyway?
 
Right now, there seems to be a limit of 110 new images that can be added by mods to a single game - if you try to add more than that you get a sprnbr error when you try to delay the sprites declared later in the mod file (unit # is irrelevant). Might depend on file size or something, I haven't tested carefully enough to say. If anyone has succeeded in modding in more images than 110 images at once, *please* let me know so I can figure out what I'm doing wrong (but I don't think I'm mistaken.)

You can add essentially as many *units* as you want - hundreds - but only ~100 new graphics.

Johan, assuming I'm not mistaken, is this limit going to increase in future patches? I understand that it probably isn't your first priority, if you're going to increase it at all.

Anyhoo - if we work under the assumption that this limit isn't going to increase, I have to decide what I'm going to put in the megamod. Do people mind if I trim their graphics down somewhat? I'd rather not do that - since I am profoundly untalented at pixel drawing as in all artistic endeavors, I am loath to lose precious eyecandy - but it's going to take real parsimony to fit in half a dozen new nations with only O(100) new graphics.

Sombre February 8th, 2007 03:36 AM

Re: 110 Image Limit... megamod anyway?
 
At least some unit graphics from some nations can be swapped for ingame equivalents, not for the 'normal' version of the mod but for a version to be included in a compilation.

If I were to get my exile mod done for instance slith graphics could easily be swapped for ingame Ctis ones.

NTJedi February 8th, 2007 04:51 AM

Re: 110 Image Limit... megamod anyway?
 
Quote:

DrPraetorious said:
Right now, there seems to be a limit of 110 new images that can be added by mods to a single game - if you try to add more than that you get a sprnbr error

That is bad news.
Hopefully the developers can increase the limit to at least 500.

Teraswaerto February 8th, 2007 05:08 AM

Re: 110 Image Limit... megamod anyway?
 
What about multiple mods? If there are several mods active that have a total of over 110 images?

DrPraetorious February 9th, 2007 12:40 PM

Re: 110 Image Limit... megamod anyway?
 
I split them back into individual mod files and nothing seems to change.

The limit on the number of added sprites *might* be higher - since I'm not totally certain which mod it is processing "first" (definitely isn't in the order in which I processed them), but it's still the same story that about half of the mods generate a sprnbr error when all are loaded at once.

If you only load 4 - seemingly any combation of 4 - everything is fine. Whether or not this corresponds to exactly 110 sprites I'm not sure.

Foodstamp February 9th, 2007 02:20 PM

Re: 110 Image Limit... megamod anyway?
 
Looks like I am running 122 graphics no problem. I am using unit index 2600-2660 all with custom graphics with 7 mods (one for each nation I have created. This includes 7 flags and 7 banners as well for a grand total of 139 graphics.

I wonder if there is a conflict between two mods your trying to mesh, as far as #unit numbers or a bad command line pointing to an invalid image for the default or action sprite.

It is worth noting I run all these mods at once and usually play games with all of them included.

Amos February 9th, 2007 03:43 PM

Re: 110 Image Limit... megamod anyway?
 
You will have another problem in that national spells cant be restricted by Age. You will have to assign separate nation numbers to different Ages of the same nation.

Sombre February 9th, 2007 03:49 PM

Re: 110 Image Limit... megamod anyway?
 
Are you sure it isn't anything to do with the namepools?

DrPraetorious February 9th, 2007 06:58 PM

Re: 110 Image Limit... megamod anyway?
 
I wonder if there is a conflict between two mods your trying to mesh, as far as #unit numbers or a bad command line pointing to an invalid image for the default or action sprite.

I'm sorry, that's *220* unit-sprite limit, counting only units. The declarations for banners etc. are all *after* the unit sprites in the megamod file, and they all load just fine, leading me to believe that only unit sprites count against the 220 limit. It may also be that smaller sprite files use up less space.

It definitely isn't a unit # conflict or the like - I deal with that in some detail in my previous thread, but basically - if you change the order in which the units are declared, the first 110 units load fine, and units after that produce a sprnbr error when you try to display them.

I have a script to rationalize the unit #s between different mods - but after extensive checking *I* can't find an error in it Since other people have downloaded the output and not posted the error I've made - I tend to think that I haven't made one, although it would be foolish to assume that, of course.

Blockquote me (follow the link above to get the attachments):
Quote:


Okay, here's how I know that isn't the problem.

Compare the two mod files I've attached (megamod_late.dm and megamod_late2.dm are zipped together) - you can swap from one to the other by renaming and then restarting the dominions executable. The only difference between the two is WHERE IN THE FILE the dwarves (Kharam Dzu) appear. You will also need the attachment at the root of this thread for the graphics if you don't already have it.

If Kharam Dzu appears in the middle of the file, you can play them (sprites for their initial commander load just fine), but when you try to recruit units, the game crashes (one of their recruitables is triggering the sprite error, therefore.)

On the other hand, if you move that entire block of monsters to the begining (as in the second file) Kharam Dzu becomes playable - and Trade Confederation, which appears immediately before Kharam Dzu in the first file, becomes unplayable. If you look at exactly what I'm moving, it has to be the number of things and not any particular thing which is causing the crash. The other nations that are playable in version 1 remain playable in version 2, even though they are also now-after Khazam Dzu.

So - Trade Federation becomes unplayable when you add Kharam Dzu to the begining of the file, but everything before Trade Federation remains playable, meaning I haven't added anything to the begining that screws up the entire rest of the file. Am I making sense?

I think this means that something somewhere is overflowing, and it's happening halfway through the unit list, and effecting all units after the overflow, even though all the units are formatted just fine.

Since whatever it is that's overflowing is triggering a sprite loading error - I would tend to assume that it's the custom sprite memory block (or something, again I don't know how Johan has engineered the thing) which is overflowing.



Foodstamp February 9th, 2007 07:16 PM

Re: 110 Image Limit... megamod anyway?
 
Ok, to help alleviate this problem, I am switching my mod "Haida Gwaii" to using ingame graphics. I am going to use external graphics for the pretender, the flag and the banner. This should help if you decide my mod is worthy enough to be included http://forum.shrapnelgames.com/images/smilies/happy.gif

DrPraetorious February 9th, 2007 09:23 PM

Re: 110 Image Limit... megamod anyway?
 
I think that's premature. The problem - whatever it may be - will probably be fixed in a future patch.

If you want to develop a version without custom graphics, though, for temporary inclusion, that'd be fine.

NTJedi February 11th, 2007 03:56 PM

Re: 110 Image Limit... megamod anyway?
 
Quote:

DrPraetorious said:
I think that's premature. The problem - whatever it may be - will probably be fixed in a future patch.


I hope you're right, but I haven't seen much activity from the developers on the forums or on the patch progress website. We're not even sure they are aware of this issue.

DrPraetorious February 11th, 2007 04:01 PM

Re: 110 Image Limit... megamod anyway?
 
Johan replied in the original thread.

I'd still like someone else to run some tests to verify that the issue is real. Johan didn't correct me, so I assume that the bug is real and that he's aware of it.

It might be platform dependent or something.

Amos February 11th, 2007 09:35 PM

Re: 110 Image Limit... megamod anyway?
 
I run some tests and the issue is real, at least with my mods.

Foodstamp April 29th, 2007 04:20 PM

Re: 110 Image Limit... megamod anyway?
 
I read somewhere that this issue had been resolved, that it had to do with mod command order? Is this really the case? I never saw a post anywhere describing the proper command order or that the issue had even been looked into.

Edi April 29th, 2007 05:52 PM

Re: 110 Image Limit... megamod anyway?
 
DrP, your link to the earlier thread is screwed up, it has some extra in the beginning of the url.

Sombre April 29th, 2007 09:42 PM

Re: 110 Image Limit... megamod anyway?
 
Was it gandalf who said this had been resolved?

He tends to get confused about some stuff to do with modding, so he might just have made a mistake there,... or it might actually be fixed. I don't know the fix though -shrug-

Foodstamp April 29th, 2007 09:47 PM

Re: 110 Image Limit... megamod anyway?
 
Aye, in the perfect sprite thread. I figured a sure way to find out is to bump this and see what DrP has to say.

DrPraetorious April 29th, 2007 11:38 PM

Re: 110 Image Limit... megamod anyway?
 
I didn't notice gandalf saying it had been resolved. Where did he say that?

He suggested an alternative cause in the original thread - that possibly the game doesn't like duplicate unit names.

That doesn't appear to be the problem, at least on cursory examination. Maybe I'm missing something.

Foodstamp April 29th, 2007 11:45 PM

Re: 110 Image Limit... megamod anyway?
 
Quote:

I think he was emphasizing "perfect sprites" rather than "perfect extraction"

and I thought the sprite cap was worked out. Something to do with the order that the commands were put into the mod file?


This is from the perfect sprite extraction thread. I thought maybe I had missed a thread where someone had found a fix to this problem. If you guys are perplexed, then I guess I got my hopes up too soon. /sad in the pants.

Endoperez April 30th, 2007 05:44 AM

Re: 110 Image Limit... megamod anyway?
 
I think Gandalf refers to when I suggested that it was a problem with multiple nations sharing the same name and existing in the same age. I think I used EA and MA Machakas (a mod and the vanilla nation) as an example in that post, although that wouldn't cause a crash because they are in two different ages.

Johan K April 30th, 2007 05:53 AM

Re: 110 Image Limit... megamod anyway?
 
The image limit in Dominions is 1000 images from enabled mods. So it should be quite a while before you reach that.

Sombre April 30th, 2007 06:58 AM

Re: 110 Image Limit... megamod anyway?
 
Despite the evidence to the contrary? What else could the problem be DrP? Any ideas?

I'm not actually that fussed because I've yet to run into this issue, but I can see it being aggravating in the future, when I try to get all the LA nations I like working together and CBM balanced.

Edi April 30th, 2007 08:58 AM

Re: 110 Image Limit... megamod anyway?
 
The limit is theoretically 1000, but that does not mean that it couldn't be broken in some way. It'll get listed later.

DrPraetorious April 30th, 2007 10:03 AM

Re: 110 Image Limit... megamod anyway?
 
1 Attachment(s)
Okay, here's the last mod I tested before concluding that "sprnbr too high for file" really is a bug with the number of custom graphics I'm using. The mod was generated automatically by an awk script.

The nation of test is playable - and can recruit their two units.

The nation of example is playable - but when you try to recruit units, the game crashes.

The units and graphics are exactly the same, but there are hundreds of units of filler in the mod file between them.

It isn't a duplicate names issue, because the first nation is still 20 units into the file.

I've also attached the mod and the crash output, but I can't think of any other elucidating tests to run. I should note that the mod does load just fine - it doesn't complain about the sprites until you actually display them.

Oh! The bug still appears if you split the mod back up into individual mod files and load them all at once. It depends on the order in which the mods are loaded, which sprites cause a crash when you try to display them.

Other than that, can't think of anything.

Gandalf Parker April 30th, 2007 01:20 PM

Re: 110 Image Limit... megamod anyway?
 
Thank you. Its a very thoughtful and complete test which will be passed on.

To answer the original question "110 Image Limit... megamod anyway? " I would say that its still worthwhile to continue working on megamods since it is obvious that Johan wanted it the game to be much more supportive of large mods than this. So at least I would say that it will get fixed.
Johan loves modders.

Foodstamp April 30th, 2007 04:20 PM

Re: 110 Image Limit... megamod anyway?
 
I hope so. I am working on my 12th nation currently, most of them use custom graphics and I was afraid that I would have to make due eventually with just in game graphics. When this issue is resolved, I am going to go back through and do custom graphics for my public releases http://forum.shrapnelgames.com/images/smilies/happy.gif

Sombre May 1st, 2007 03:12 AM

Re: 110 Image Limit... megamod anyway?
 
I just ran into this running these mods all at once in the late era.

Conceptual Balance Mod
Worthy Heroes
Streamers and standards
CBM Vaettihiem SE 2
CBM Jomon Broken
CBM Teutanion 2
CBM Ulm Reborn 2
CBM Kharamdzu
CBM Sanguinia 2

I noticed something was wrong when during the god setup screen all the mod nations came up with 'no description found' instead of their proper descriptions. Then once in the game the first several nations in the list worked (I had them all set to human) but when I reached Vaettihiem and tried to look at the recruit screen, the game crashed and I got the sprite number too high for this file or whatever error message.

I can verify that there are no conflicts between these mods. The problem only occurs when I have them enabled together.

I am going to try the same settings but with all the nations bar one set to AI and see if that makes a difference, just out of interest. Oh and the descriptions of the nations are still missing if you try to look them up within the game.

The map was silent seas.

Sombre May 1st, 2007 03:29 AM

Re: 110 Image Limit... megamod anyway?
 
Ok I just did some further testing and came up with a very interesting result.

I noticed that all the nations worked (although they were missing descriptions) except for Vaettihiem. Now Vaettihiem wasn't the last mod I enabled in preferences, or the last side I added,.... but alphabetically it was the last in terms of the name of the DM file, the name of the mod etc, since it started with V.

I then renamed CBM Ulm Reborn.dm to CBM Zulm Reborn.dm and made a new game on Aran, LA, same settings but with Zulm Reborn now enabled rather than Ulm Reborn.

Now vaetti works but Zulm (ulm) reborn does not. This means that the game loads up the .dms alphabetically and that once is reaches (z)Ulm Reborn there are too many sprites.

I hope this test helps in finding a solution. I am personally convinced that it's to do with the number of sprites. I have no idea why the descriptions broke as well though -scratches head-

Sombre May 1st, 2007 03:39 AM

Re: 110 Image Limit... megamod anyway?
 
DOH

I just ran another test to confirm what I thought I had found out and it turns out I'm wrong.

It's the order that you enable the mods in preferences that determines the order they are loaded and therefore which one will produce the sprite error. The only reason I thought it was alphabetical was because I was enabling them in that order because that's the order they were listed. When I renamed Ulm to Zulm I had to re-enable it and therefore it was the last one I enabled and so it was the one that crashed.

So yeah, it's the order you load them up in that determines when the crash happens, not the order they are alphabetically or otherwise.

Gandalf Parker May 1st, 2007 12:06 PM

Re: 110 Image Limit... megamod anyway?
 
Good info. Thanks for that.
That should help someone pin it down.

Just a stray thought but in many programming/scripting problems its non-closure. Im not a modder so this may be way off but will a mod operate on its own happily without a final closer (such as #end) but fail when chained together?

And on the massive checks, did we get a search/count on sprite lines? Im guessing thats what we need in case some sprites were used multiple times rather than a count of the files themselves.

Missing descriptions? So it might not be the cap on sprites but the space allocated for new descriptions? 1000 sprites I can see but 1000 descriptions? wow.

DrPraetorious May 1st, 2007 12:08 PM

Re: 110 Image Limit... megamod anyway?
 
Well, the 110 limit does come from a line-count.

But it might vary on the size of the sprites. In fact, if it's a memory overflow error or something, I'd expect it to.

Foodstamp May 1st, 2007 01:32 PM

Re: 110 Image Limit... megamod anyway?
 
I think it is a memory issue as well because descriptions are getting truncated sometimes or end up completely missing it seems from reports.

Gandalf Parker May 1st, 2007 02:57 PM

Re: 110 Image Limit... megamod anyway?
 
Johan might have increased the sprite size, resolution, colors for Dom3 but not tested as much as we are. He is still using batches of his old sprites. And a linux. It might work fine for 1000 of HIS sprites. http://forum.shrapnelgames.com/images/smilies/happy.gif

Gandalf Parker May 1st, 2007 03:00 PM

Re: 110 Image Limit... megamod anyway?
 
It should be possible (for someone other than me) to script up a mod generation script that duplicates a sprite 100 under 100 new names. Try it for different kinds of sprites.

DrPraetorious May 1st, 2007 03:33 PM

Re: 110 Image Limit... megamod anyway?
 
The mod I just posted uses the same name for each of the 700 sprites, but it's the "same" sprite every time (but loaded individually rather than duplicated with copyspr.)

What exactly do you want me to test?

Sombre May 1st, 2007 03:34 PM

Re: 110 Image Limit... megamod anyway?
 
Different sized sprites? Two colour vs coloured?

Gandalf Parker May 1st, 2007 03:51 PM

Re: 110 Image Limit... megamod anyway?
 
Im not sure of the diff between dom2 sprites and dom3. Didnt we get a bigger size allowed and more colors?

lch June 7th, 2007 07:15 AM

Re: 110 Image Limit... megamod anyway?
 
Just saw this in the bug thread. As I want to host a game of the CBM LA mod nations I created some kind of "megamod" as you call it and I did not have problems even with the > 300 custom sprites that I used. Or is this about all units being in a battle at the same time? I have, however, gotten "Nagot gick Fel: spritenbr too high" errors when I removed sprites from some new units.

What I noticed is that there seems to be a limit to the number of custom description texts. See my bug entry .

Edi June 7th, 2007 07:54 AM

Re: 110 Image Limit... megamod anyway?
 
Ah, thanks for reminding me and pointing this out, Ich. I'll update that bug entry to reflect this new discovery.

DrPraetorious June 7th, 2007 08:54 AM

Re: 110 Image Limit... megamod anyway?
 
Ich - could you post (or link to) the exact mod you used, so I can take a look at it?

lch June 7th, 2007 09:25 AM

Re: 110 Image Limit... megamod anyway?
 
I have posted the preliminary mod here: http://www.shrapnelcommunity.com/thr...?Number=526583

The last four or something units have their descriptions removed, namely some of Jomon Broken's commanders. If you remove some of the descriptions of new units from the mod (or cut and paste them higher in the mod), their descriptions show up again.

DrPraetorious June 7th, 2007 10:25 AM

Re: 110 Image Limit... megamod anyway?
 
This mod has 161 new-unit-sprite-pairs, which is more than works when I test with full-sized sprites. However, if you use undersized sprites you can fit more.

The mod doesn't use anything in the 24xx range, so I tried adding another 100 sprite-pairs 2400-2499.

Can I add one dummy unit entry at the begining without breaking anything.... yes.

Can I add ten of the same dummy unit entry at the begining (different unit #s) without breaking anything.... yes

Can I add 100 of the same summy unit entry at the begining without breaking anything.... no!

The hoburgs play just fine but jomon crashes with the good old "sprnbr too high for file" error. Again, it has to do with order of declarations in the file (the Jomon units are declared last).

Anyway, the actual limit on the number of sprites depends on sprite size. Since most of the sprites in this mod are well below 256x256, you can fit more than the 220 pairs limit I ran into.

I'm eventually going to put together a megamod, but it'll be structured a little differently and it won't have any relationship to conceptual balance.

Edi June 7th, 2007 12:03 PM

Re: 110 Image Limit... megamod anyway?
 
Shortlist has been updated to reflect the new information.

Sombre June 7th, 2007 12:44 PM

Re: 110 Image Limit... megamod anyway?
 
I think I just worked it out.

When Ich replaced all the #spr1 and #spr2 in that file with --spr1 and --spr2 he got the same sprnmber too high error. This didn't make sense to me, since that error comes from having too many extra sprites, as far as we know. When you don't input a spr1 and spr2 the game uses a default, either the pic of unit number 1, which is a arco hero or a centurion or something, a vanilla looking human, anyway,.... or it uses some huge four armed yellow trouser wearing indianesque monster (one of the mandaha or whatever demons?). I believe that all those added monsters who got converted to the huge four armed indian demon thing resulted in too much sprite size total.

In other words, using the default sprite or perhaps even copyspr might not stop space from being used up - it all depends on the size. Since the indian demon thing is very large, it takes up a lot of space and thus he got the error,....

That's my theory, anyway.

llamabeast November 3rd, 2007 10:43 AM

Re: 110 Image Limit... megamod anyway?
 
I can confirm that copyspr seems to be just as bad as using new sprites, even if you are copyspr-ing a vanilla unit.

Mine and Sombre's mods contain a set of new units which copystats vanilla pretenders and then make them available for the nation. Removing this section improves the sprnbr situation. I've just managed to make my mod for Marmoset work by doing that.

Sombre November 3rd, 2007 10:50 AM

Re: 110 Image Limit... megamod anyway?
 
So not just copyspr, but any new monsters wth sprites (ie all of them) at all?

That's harsh.

Maybe the solution is to overwrite base game monsters and declare new sprites then? Possibly to overwrite all the non used monsters so they have the smallest possible sprites? (32x32 I think).

lch November 3rd, 2007 06:00 PM

Re: 110 Image Limit... megamod anyway?
 
I have created a dummy awk script to try out where exactly the sprnbr error too high error hits, but so far I have not been able to reproduce it. What's funny, I tested replacing sprites of existing units and that stops after a couple of them, too. It doesn't crash, but even when I replaced all sprites for all the units in the game, only some of them were really replaced.


All times are GMT -4. The time now is 01:06 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.