View Full Version : new nation problem
Swan
December 21st, 2009, 06:36 AM
i'm working on a new nation but when i try to test it i get this:
"cfh: can't open file".
i'm using windows 7, is this the problem?
elmokki
December 21st, 2009, 08:40 AM
Windows 7 most definately isn't a problem in modding.
I doubt anyone can give you an answer easily without you posting the mod file here.
Swan
December 21st, 2009, 09:32 AM
here there is the file
Sombre
December 21st, 2009, 10:06 AM
I think you need another #end at the bottom of the file. This is just off the top of my head though, I haven't written a mod from scratch in ages, just based them off previous dms.
Fantomen
December 21st, 2009, 11:14 AM
Could it be the .txt extension? Should be .dm right?
Sombre
December 21st, 2009, 12:17 PM
Sure but I assume he converted to text for upload.
Swan
December 21st, 2009, 02:00 PM
yes, i converted for upload.
i added #end, but i still get the error.
anyone else?
Stavis_L
December 21st, 2009, 03:25 PM
Well, on the off chance that the error is meaningful, I'd say first of all make sure that all the files referenced in the mod (the .dm itself, and all the images) are a) not currently open in another program and b) in a location with the same security permissions at the main mods folder (by default they should be, assuming you created the subfolders by hand vs. eg. unzipping an archive or something.)
If that doesn't get rid of the error, I'd say next look for potential issues in the .DM file. I see that you've got some non-ASCII characters in it (e.g. line 25/26.) I've no idea what assumptions Dominions IIII's engine makes regarding text data, but it's something to try. Sombre already pointed out the missing #end command. Nothing else jumps out at me.
If nothing stands out, then a typical debugging approach is to try small bits of the program (and that's what the mod is, an extension to a program in DOM3's scripting language) to see if they work independently. Try making a "micro mod" that has just the bare bones - modname, description, and version. Once that's working, put in a little bit at a time of your actual mod to see if it works in isolation (obviously, you'll need to have anything it's dependent upon there as well, e.g. if your unit references a weapon number, both need to be there.)
Hopefully you should be able to isolate the problem area that way.
Foodstamp
December 21st, 2009, 08:53 PM
I noticed you did not designate any start units assigned to the start commander. Also, some general game mechanic mod commands are contained in the nation, I think you misunderstood these to be nation modding commands.
They are:
#deathsupply 40
#nodeathsupply
#coldsupply 3
#coldincome 2
#unresthalffinc 25
#unresthalfres 50
#poppergold 75
Some of the above do not exist as modding commands period. Try commenting those out and assigning starting units (both types) to the start commander.
Swan
December 22nd, 2009, 06:55 AM
I noticed you did not designate any start units assigned to the start commander. Also, some general game mechanic mod commands are contained in the nation, I think you misunderstood these to be nation modding commands.
They are:
#deathsupply 40
#nodeathsupply
#coldsupply 3
#coldincome 2
#unresthalffinc 25
#unresthalfres 50
#poppergold 75
Some of the above do not exist as modding commands period. Try commenting those out and assigning starting units (both types) to the start commander.
This commands are in the mod manual, so they should be right. or these can be used only to modify existing nations?
and i wrote #startcom 2290 so these should not be the issue.
i'll try to eliminate the "£" symbol. <-- not the problem
i used copyspr, have i to put the already existing sprite in the venexia folder with other images?<-- yes i had to
problem fixed
Sombre
December 22nd, 2009, 07:01 AM
They are? Since when? I've never seen them.
Stavis_L
December 22nd, 2009, 09:05 AM
I noticed you did not designate any start units assigned to the start commander. Also, some general game mechanic mod commands are contained in the nation, I think you misunderstood these to be nation modding commands.
They are:
#deathsupply 40
#nodeathsupply
#coldsupply 3
#coldincome 2
#unresthalffinc 25
#unresthalfres 50
#poppergold 75
Some of the above do not exist as modding commands period. Try commenting those out and assigning starting units (both types) to the start commander.
This commands are in the mod manual, so they should be right. or these can be used only to modify existing nations?
and i wrote #startcom 2290 so these should not be the issue.
i'll try to eliminate the "£" symbol. <-- not the problem
i used copyspr, have i to put the already existing sprite in the venexia folder with other images?<-- yes i had to
problem fixed
What Foodstamp means is that they are valid for modding the Game a whole, not valid for modding a particular nation.
Basically, #deathsupply, #coldsupply, #coldincome, #unreshalfinc, #unreshalfres, and #poppergold affect all nations, not just the mod nation, so it's probably not valid to include the commands inside the #selectnation/#end brackets that define the modded nation. These should go way up at the top or at the very end of the mod (if you really want to use them.)
However, #nodeathsupply is a valid nation mod command; it makes it act like Abyssia with regard to death scales.
And to Sombre - these are all documented in the 3.23 version of the manual under General Modding (except #nodeathsupply, which is in 13-3 Sites & Dominion.)
I expect you don't normally want to muck about with those tough, unless you're doing a global rebalance mod ala CBM.
Sombre
December 22nd, 2009, 09:43 AM
Yeah I just hadn't kept up to date with the global commands that are now available so a couple of those looked weird to me.
Foodstamp
December 22nd, 2009, 10:38 AM
My mistake, the deathsupply 40 looked a bit odd to me. I've only fiddled with global commands once. But you are misunderstanding me about the starting units.
You need to assign 2 units types to be commanded by the starting commander. This may be somewhere in your mod but I didn't see it. I can't remember the command off the top of my head but I think it is something like #startunit(1,A?) etc. I'm at work, so I don't have access to the mod manual. If you don't, you will not have a turn one army.
You should post the entire mod including the sprites, and I will take a look at it tonight for you.
Swan
December 22nd, 2009, 04:59 PM
Stavis_L: ach, seems like i have to delete them
foodstamp: well the mod is far long to be finished, half the sprites is recolored version of vanilla sprite when the other half is vanilla sprite.
here there is the code and the sprites
vBulletin® v3.8.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.