Here's the deal, I cannot get a custom image or ruleset to load into my game. I'm on windows xp pro. I saw the previous post... but didn't get much of anything from it. I couldn't even get into the jar files without downloading a special archive tool.
I downloaded your folder invadeEarthresource.jar (or something like that) and I found all the rulesets and images for the different maps. The problem was, it didn't matter what I did from there, it never made any changes within the game. I tried using the map editor... and got nowhere. Then I tried copy and paste the XML from classic and renamed it and changed the options around to my liking. I initially about gave up, thinking the files were accessed online each time they were used. But that made no sense so I kept looking. Eventually I tracked down the following things:
Desktop shortcut pointed to > C:\WINDOWS\system32\javaws.exe "C:\Documents and Settings\Shadowraven\Application Data\Sun\Java\Deployment\cache\6.0\51\2c2eab3-2c1f1bd6"
Now, being familiar with batch scripts I realized that it's running the java web start and from there opening the second path. I went in and dug around a bit. The 2c2eab3-2c1f1bd6 is just the xml for invadeearth... but ~6.0\57 contains the files
4ad5bff9-67c11802 and
4ad5bff9-67c11802.idx
I found that these two files are both used at some point in the program. The first is a jar file without an extension, containing the contents of the invadeearthresources.jar including all the maps, xmls, icons, etc. But the idx file I can't figure out how to read or open properly. I know that it at least verifies the contents and overall length of it's respective jar file, because when I tried to change the jar file it was not in sync with it's idx... and invadeearth failed to load anything... even an error message. Although, the program did continue to run according to the taskmanager.
What I tried to do was extract the contents of the jar, add my new ruleset and bg-image, and turn it back into a jar file of the same name. (renaming the original to name+backup) But I couldn't get the files in the proper order within the jar file either, the manifest always came last (of the three files, including jonathan.dsa and jonathan.sf) and in the original jar, the manifest comes first. I'm not sure if that would break it, or it's about the idx file needing to be updated.
I dunno what to do any further. Maybe I'm digging too far into this?? Can someone give me step-by-step on how to get this to work. In short, I'm just trying to build a custom map, with my own image as the background, and actually have it work.
Anything helpful would be greatly appreciated.
?
They have a mad editor for building your own maps. You can select new game>from file>"your game"
The map editor saves it in the xml format without an extension.
In the map editor under the "map" tab you have the option ...Use Background Image. It pops up a dialogue which gives you map images to choose from... but they only include game defaults. There's not much point in building a new map if you cannot use a new image, or at the very least, an image edited to reflect the changes you made. I assumed the maps given in the dialogue were saved on the system somewhere, as they are accessible offline as well. However, I can't get it to work. In a previous post in the invadeearth section, someone implied that it was fairly easy to upload custom images, and even have them update the folders of people playing in your server, so they too could see everything proper.
My goal is to build a custom map on top of a custom image, and for the new image to be transferred to other users, along with the xml.
I've come to think that the easiest route to solving this problem is by uploading the image onto an image host, and directing the xml to pull the background image from the source located online. However, I can't figure out how to do that.
Here's the first bit of the xml for my custom map:
?xml version="1.0" encoding="UTF-8"?
game version="3.0.3"
rules
java version="1.6.0_03" class="java.beans.XMLDecoder"
object class="org.invade.rules.ClassicRules"
void property="allowLongFreeMoves"
boolean true /boolean
/void
void property="maxFreeMovesPerTurn"
int999/int
/void
void property="randomTerritoryAssignment"
boolean true /boolean
/void
void property="startingRegularUnits"
int 80 /int
/void
/object
/java
/rules
board
width 2660 /width
height 1430 /height
image href="http://i161.photobucket.com/albums/t221/shad0wr4ven/USA-1.jpg"> /image
The last bit there, bolded, normally reads "(image)classic.jpg(/image)" excepting ) and ( for > and
How can I get it to pull from a network or internet resource?
um, I don't think you can :( The code simply wasn't designed to do that. No one ever seemed that interested in custom maps.
That would be a good solution though, allowing it to pull from the internet. Probably wouldn't be terribly hard to implement.
Right now the XML map is sent to other users, but not the image. Everyone would have to click "View > Set background image" (in the game, not the map editor). Of course, it's entirely possible to play without an image, and the game will draw polygons etc. for the countries. But that's obviously not as cool.
well... I've tried setting the option for (image) in the xml for both my custom image, and for the default image.
With the default image it comes up fine for both users, but with the custom image, it draws the polygons and edges, but no background. Like you said, you can always manually distribute the image and override, but I think it'd save a lot of hassle if the code allowed it to pull from an outside source using an href or some sort of link.
oh, just for the record... i'm no coder lol.
I like to dabble, explore, experiment, and that sort of thing, and while I've picked up tidbits about programming in different languages, and learned about some different types of scripting... I don't know the first real thing about coding in full java.
Well it wouldn't take a *lot* of changes to Invade Earth to do what you're asking, but I would have to go pull the code and release another build, which might have bugs etc.... I'm adding it to the list of "things to do if I ever get around to working on Invade Earth" :S but for now we're stuck with the "manual override" as you call it.
Well thanks for the help and insight. It's greatly appreciated. I was afraid that by the appearances of the forums it might have been weeks before anyone even noticed I posted. :)
Good to know there are people that at least check in. I personally thank you guys for what you all do in your spare time for the rest of us nerds without skills. ;)
OK... for the record you can do this in the map editor now (use an image through any URL)
Re: okay... I need help.
Wow, well there are about two ways I would imagine going about that, depending on what you mean.
You can load a custom map and image into Invade Earth as it is now.
If you want other people to be able to play with you online, the simplest thing to do is send them the image file, and they can load both of them in-game (New game with custom map, and then View > Set Background Image) with zero changes to the program code.
Or... are you trying to create a custom build of Invade Earth so that the map and image are included as a default option? If you did this, it would only work for you (and whoever had the custom build). The easiest way to do *that* would be to get the code from Sourceforge, add the files to the correct location in the source tree, and then add your files to the default lists in the code.
or am I missing your point entirely....? Sorry, it's been a while since I have worked on or updated Invade Earth....