Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Error trying to mod entirely new races

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Tech Support >> Error trying to mod entirely new races Page: [1]
Login
Message << Older Topic   Newer Topic >>
Error trying to mod entirely new races - 12/12/2012 11:35:08 AM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
The DW races are great but nothing beats your own imagination for getting really invested, I think.

Anyway, used the original custom theme as a basis and added all my custom races. But I find 39 a bit of an eyesore on the menu.

So, using Igard's fine example (as well as some of your ships, Sir - tried to put together a mod with just 10 of my custom races to start.

But I always get the same unhandled exception:


Value cannot be null
Parameter: Image

Have any of you gents been down this road before? Or perhaps have some general pearls of wisdom you could throw me so I could cash in?

Kudos to you all,
Gray Area
Post #: 1
RE: Error trying to mod entirely new races - 12/12/2012 11:56:13 AM   
Bingeling

 

Posts: 5186
Joined: 8/12/2010
Status: offline
I have never modded this game, but I would make sure all your race/image indexes are a continuous chain of numbers. Starting at 0 or 1, you want:

0, 1, 2, 3, 4

And not

0, 1, 2, 4, 5

Also make sure your image IDs match the race ID or whatever. It gets null when it looks for an image, and that could be because the image does not exist, or that it looks in the wrong folder. Or quite possible, but unlikely - the permission of that folder.

(in reply to Gray Area)
Post #: 2
RE: Error trying to mod entirely new races - 12/12/2012 1:22:44 PM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
Thanks Bingeling,

It is the basics that sometimes we miss, or certainly I do. I hope that I have. Unless I have developed a dyslexic eye and keep missing the same simple error. I'll follow your advice and do a test again.

Appreciate you giving this a think,
Gray Area

(in reply to Bingeling)
Post #: 3
RE: Error trying to mod entirely new races - 12/12/2012 4:32:19 PM   
Bingeling

 

Posts: 5186
Joined: 8/12/2010
Status: offline
It is incredible how much a stupid error can hurt you if you got no proper debug feedback.

For instance:

Image is null

vs

Image is null. getRaceImage, raceIndex=1, imageIndex=3.

(in reply to Gray Area)
Post #: 4
RE: Error trying to mod entirely new races - 12/12/2012 6:10:33 PM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
Yeah, I hear that. Bias text was a mess, so I'm glad you posted. But still not the mystery image value .

The lack of specifics in bug reports is bugging.


(in reply to Bingeling)
Post #: 5
RE: Error trying to mod entirely new races - 12/12/2012 9:42:00 PM   
Darkspire


Posts: 1986
Joined: 6/12/2003
From: My Own Private Hell
Status: offline
Not sure from your last post or the first one where you are or what file you have a problem with, but ill try to help.

This lines from the character folder, the file for your races characters.

5, Korbi Hassari, 5,image.png, yourracename, 40, 16, 41, 14, 42, 18, 43, 12, 49, 67, 56

This ones from the races folder, the file for your race.

'Picture index: index of picture used for this race from race pictures contained in Images\units\races\ folder or Customization\YourTheme\raceImages\ folder
PictureIndex ;22

If you can tell me which one looks the most likely culprit ill try to help to find whats gone wonky.

Darkspire

_____________________________


(in reply to Gray Area)
Post #: 6
RE: Error trying to mod entirely new races - 12/13/2012 6:01:31 PM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
Thanks Darkspire,

As a relative newbie I'm not too sure myself. What I've done is use the original custom theme as a template and added my custom races+shipsets+troopimages+policies+biases, then deleted the old ones.

I know my races are fine because I can add them to the original custom theme and play each race. Only problem is there are too many at 39. Maximum I seem to get is 33. Which is slightly too many for the screen I feel. Anyway, I know the files are OK - so I thought...

Here is the exception error, hope it doesn't take too long to spot what it is:

System.ArgumentNullException: Value cannot be null.
Parameter name: image
at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
at DistantWorlds.Controls.InfoPanel.PrescaleImage(Bitmap originalBitmap, Int32 width, Int32 height)
at DistantWorlds.Controls.InfoPanel.InitializeImages(CharacterImageCache characterImageCache, Bitmap[] troopImages, Bitmap[] resourceImages, Bitmap[] raceImages, Bitmap[] builtObjectImages, Bitmap[] fighterImages, Bitmap[] ruinImages, Bitmap[] habitatImages, Bitmap[] facilityImages, Bitmap approvalSmileImage, Bitmap approvalNeutralImage, Bitmap approvalSadImage, Bitmap approvalAngryImage, Bitmap developmentImage, Bitmap colonyImage, Bitmap firepowerImage, Bitmap shipGroupLeadShipImage, Bitmap capitalColonyImage, Bitmap regionalCapitalColonyImage, Bitmap automateImage, Bitmap blockadeImage)
at DistantWorlds.Main.UCItnSSqgm()
at DistantWorlds.Start.kGin8N08v(String , Boolean , Boolean )
at DistantWorlds.Start.ga7nMHaDgU(Object , EventArgs )
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at DistantWorlds.Controls.GlassButton.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at DistantWorlds.Controls.GlassButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



Cheers,
Gray Area

(in reply to Darkspire)
Post #: 7
RE: Error trying to mod entirely new races - 12/14/2012 2:30:34 AM   
Darkspire


Posts: 1986
Joined: 6/12/2003
From: My Own Private Hell
Status: offline
Doesnt help to much, I tried to replicate the problem and think it is your character file, which kind of makes sense if you say your races worked in the other mod. Could you upload a file, one of your custom race files for characters that you created in your mod folder for characters, I hopefully should then be able to fix it for you and tell where it went wonky so you can learn from there.

Darkspire

_____________________________


(in reply to Gray Area)
Post #: 8
RE: Error trying to mod entirely new races - 12/14/2012 9:31:36 AM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
That would be outstanding Darkspire,

Problem is I don't have character files. I wanted to strip things down to basics to test. So I have: Policy, raceImages, races, shipImages, troopImages folders and files and a biases text file.

My troop images are a little large at about 600x200+ pixels. Could it be that?

Everything is labelled sequentially without gaps and sized like other files. And as I say tested so I know they work added on individually to the original theme.

To be honest I don't know what I'm looking at in the exception error...

Thanks for giving me a hand so far dude

(in reply to Darkspire)
Post #: 9
RE: Error trying to mod entirely new races - 12/14/2012 10:05:43 AM   
Darkspire


Posts: 1986
Joined: 6/12/2003
From: My Own Private Hell
Status: offline
Well in that case there are a few things that it could be, and yes those troop images are way to big, mine are 81x51 the easiest thing to do is to set up a free account here and send me the link by PM to the file and ill take a look through it, there are four possible things that may be causing the problem in the list you gave. Ill go through it and then explain what the problem was. Not meant as an insult, just wondering did you give the new 'Distant Worlds Legends - Modding Guide.pdf' a good read? Like yourself I reverse engineered to start to learn and that guide filled all the blanks in. Dont worry though we will get you making your own mods

Darkspire

_____________________________


(in reply to Gray Area)
Post #: 10
RE: Error trying to mod entirely new races - 12/14/2012 2:45:21 PM   
Gray Area

 

Posts: 15
Joined: 12/1/2011
Status: offline
Cheers Darkspire,

Honestly I couldn't take your critique as an insult - clearly I've gone wrong somewhere or overlooked something.

I uploaded the races, raceImages, troopImages folders and the biases file. My shipImages are got from other peoples' contributions so it could only be the filenames at fault. My policy files were ok when tested individually and since they don't ref pics as far as I can see I haven't included these either. I figure there's just got to be good manners in using up another man's time. I'll PM you as I can't upload link because of some number of days since 10th post restriction. I haven't sought permissions but please feel free to use if you like. I did read through the manually but not page by page. Thanks for the suggestion, I'll get on that.

Again, appreciate your help. I'm still hoping for a Distant World's Christmas!

,Gray Area


< Message edited by Gray Area -- 12/14/2012 2:48:11 PM >

(in reply to Darkspire)
Post #: 11
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Tech Support >> Error trying to mod entirely new races Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

2.063