Jump to content

Tiles - more variety?


UfoTubby

Recommended Posts

UfoTubby: Somewhat similarly, what is going to happen with your new props that you posted in the first post in this discussion? Are you going to release them as a mod or what is the plan? It should be very easy to turn all those new modified props into a mod that'd at random replace the stock ones to get exactly the variety you want (I don't know if somebody has already told you how, I could do that if needed). And you could of course add a lot more of such props if you felt like creating them.

Link to comment
Share on other sites

Wow, I didn't expect a sudden hailstorm of posts to pop out. :confused: I thought you guys lost interest in mapping.....

Yes, I've lurked around the mapping discussions for awhile, and the new tilesets seemed too good to pass off. I could make props to suit the jungle theme(shacks, colonial buildings), and might even add in Asian tilesets (pagoda, pagoda walls, Asian signboards) to suit Asian cities. I cannot stand the fact that the Soviet Union demolished China's cultural buildings just to appease its ferverish communism, or that all Asian farms are Westernised by American Imperialists! I'm an Asian and that insults me, grrr.

Anyway, I'm up for this undertaking, but I take it that all the building props are 1x1 and making them is like building up lego blocks.

Link to comment
Share on other sites

IIRC Solver said somewhere that he wanted to make tilesets extensible instead of the current hardcoded set, but if he doesn't have the time, I could try to put this somewhen near the top of my todo list if that'd help.

It would be useful to know how exactly it was going to work in advance. I'd had plans for stealing the existing unused Tundra tileset and turning it into a Jungle one (just using the Tundra tilset in code) but if tilesets are going to be opened up there's no point doing anything until then, otherwise all the image file-paths will need redoing.

That said, for me personally there's no rush as there's no chance I'd be doing anything with it for at least the next couple of weeks.

Link to comment
Share on other sites

It would be useful to know how exactly it was going to work in advance. I'd had plans for stealing the existing unused Tundra tileset and turning it into a Jungle one (just using the Tundra tilset in code) but if tilesets are going to be opened up there's no point doing anything until then, otherwise all the image file-paths will need redoing.

I don't think that matters. Just create the tileset as tundra and whenever tilesets can be dynamic it'll be just a matter of renaming the tileset name in the path, which can be scripted (I can do that for you if you don't know how - e.g. just 2 days ago I fixed 384 window props to have a proper bulletScore in undamaged state and I sure as hell didn't do that manually).

Link to comment
Share on other sites

Ok, I guess we sort of hijacked UfoTubby's thread for this. :P But from the conversation I assume that the it's a colossal effort to try and make new ones, and using the only unused asset, which is the tundra, to stuff as much content in there as possible would be simpler, right?

In the meantime, I'll try to wade in some space in my schedule and make some Asian props, starting with an asian outdoor fence.

Link to comment
Share on other sites

Ok, I guess we sort of hijacked UfoTubby's thread for this.

No prob, was an interesting read :)

UfoTubby: Somewhat similarly, what is going to happen with your new props that you posted in the first post in this discussion? Are you going to release them as a mod or what is the plan? It should be very easy to turn all those new modified props into a mod that'd at random replace the stock ones to get exactly the variety you want (I don't know if somebody has already told you how, I could do that if needed). And you could of course add a lot more of such props if you felt like creating them.

I still plan to release them, but want to create some more directions of those edited cars before, plus maybe some other tiles.

A mod that does random replace would be nice indeed - currently I don't know how this would work, and help would be appreciated certainly. I've read kabill's and Skitsko's replies, but had no time so far to go into this kind of work.

Link to comment
Share on other sites

A mod that does random replace would be nice indeed - currently I don't know how this would work, and help would be appreciated certainly. I've read kabill's and Skitsko's replies, but had no time so far to go into this kind of work.

If you want a specific example, here's how you'd create a mod adding your bus as an alternation for the in-game one:

  • Go to assets/maps/town/props/bus_LR/ . That is a directory for the bus_LR (=left-right) submap for town (i.e. non-soviet terror) maps. There's also bus_UD/ directory next to it for the other bus orientation.

  • Create a copy of bus_LR.xml called e.g. bus_LR_green.xml (inside the same bus_LR/ directory). Modify it to replace name="bus_LR" with name="bus_LR_green" and layer1="town/outdoor props/bus_sw" with layer1="town/outdoor props/bus_sw_green" . That has created another option for the bus_LR submap, and game will randomly pick one of the options whenever a map that is being created needs this specific submap.

  • Go to assets/tiles/town/outdoor props/ . That is a directory that the path edited in the step above points to, that is where the spectre for the submap is located.

  • Create a copy of bus_sw_spectre.xml called bus_sw_green_spectre.xml . Modify it to replace all instances of bus_sw inside it with bus_sw_green (there are 4, one is id=, 3 are src=), so that e.g. the first src= becomes src="tiles/town/outdoor props/bus_sw_green_damaged.png" .

  • Now it is necessary to create the graphics the src= items point to. So copy bus_sw.png to bus_sw_green.png, bus_sw_damaged.png to bus_sw_green_damaged.png and bus_sw_destroyed.png to bus_sw_green_destroyed.png (or just copy there the ones you already have).

  • That should be all for creation of the variant of the bus_LR submap.

  • Now it can be tested (easiest is to modify assets/levelsetup_quickbattle.xml and change tileset="farm" to tileset="town". If the game is now run with -quickbattle argument, after starting a new game it'll directly go GC with the given tileset, so it can be verified. If you use Xenonauts_gc_editor.exe, pressing Ctrl+Q in ground combat will reveal the whole map to immediately see everything.

  • Note that since the selection of the submap is random, you may get unlucky and not have your new submap selected.

  • Also, it is possible that the game will select a map for the tileset that does not need this specific submap at all. That can be helped by going to assets/maps/town/ and searching for files which refer to bus_LR (they contain <submap name="bus_LR"). One such file is assets/maps/town/UFOMaps/carrier/town_large_picketcharge.xml , and use of this specific map can be forced by changing the Map tag in levelsetup_quickbattle.xml to <Map tileset="town" mapname="town_large_picketcharge" /> in this case. It may be also necessary to alter the SpawnTarget element tag there to say the proper UFO type, since the map is in carrier/ directory, it should here say <SpawnTarget ufoType="airplane.alien.carrier" ufoLandStatus="landed" /> .

  • In order to pack these new files as a mod, create an empty mod (specific example here) and move all the newly created files into it. So if the mod would be e.g. assets/mods/ufotubbyprops , create that directory, create modinfo.xml in it, copy assets/maps/town/props/bus_LR/bus_LR_green.xml to assets/mods/ufotubbyprops/maps/town/props/bus_LR/bus_LR_green.xml (the path has mods/ufotubbyprops/ added after assets/) and so on for the rest of the files, and finally create a .zip of all the files inside the ufotubby directory. Since the mod creates only new files, there's no need for any explicit MODMERGE stuff used by modular mods.

  • The .zip file now should be possible to install using the "Modding Tools" in the game launcher (which, if you created it there manually first, would just overwrite it in the same location, so before testing back up and remove everything created manually).

That should be it. The list above may look long, but that's just because it's really step by step, this part is actually rather trivial once one gets it working the first time. It's possible to do some of the work using the mapping tools, but since this is about creating copies of existing assets and modifying them, I find it easier to just directly copy and modify the relevant files.

So, when can we expect ufotubbyprops v0.1 ;) ?

Link to comment
Share on other sites

Making some progress with those cars:

brAQulK.png

I have those working in the game now following llunak's guide to implement props. Seems to cause no probs in quickbattle tests and are placed correctly on streets, so I guess I could release them as a first minimod this weekend.

I did only SE and SW directions of both the combi/wagon/caravan (or whatever it's called in your language :)) and the pickup, with different color per direction. IMO there should be no issue with this since there can be only one direction per car placed on a given spot, so you get for example a green pickup in SE, a yellow one in SW direction.

My long-term goal would be to have some really new stuff (after all these variations are just cut&paste jobs with some extra editing from vanilla gfx) but that takes more time of course.

Link to comment
Share on other sites

Sigh, ran into an annoying problem.

I had finished the car variants, including some further color variations of van and starlet cars at least for some directions. I had all files in the original game folders first. Using this method the changes did show up regularly in the game in town maps (the only tileset they're assigned to so far).

Then I moved all into a specific mod in assets/mods/etc. and nothing seems to work anymore. That is the game works fine of course, but none of my additions/changes show up anymore after lotsa tries (only vanilla cars).

So the first thing to do would be to check the mod's setup/folder structure etc. - but I spend now ages on this without finding the prob. Never had that trouble with the laser weapons mod. Putting the stuff into original folders works, as a mod it does not, even when I can install it normally using modding tools.

Would there someone be willing to have a look into the files below and at least point me to the prob so that I can fix it? Maybe I'm just not seeing the forest for the trees anymore. Any help would be appreciated...

edit: attachment removed, see below for update

Edited by UfoTubby
Link to comment
Share on other sites

Yeah, they're new indeed. And what bugs me most that it all works when I move it to the orignal game folder(s) instead of using it as mod.

Well, since it does not overwrite any original stuff this way would still work, but having it as simple-to-install-mod would be of course preferable, esp. since I actually wanted to enhance this with more stuff over time.

Edited by UfoTubby
Link to comment
Share on other sites

Ooomph, thx a lot for the answer - I'll post it in completed when 0.31 is out then.

Meanwhile if people just want to try the new stuff they can use the file attached here and manually install in the standard game folders. As said, it does not overwrite anything but would need manual removal if someone wants to get rid of it again.

Link to comment
Share on other sites

As said, it does not overwrite anything but would need manual removal if someone wants to get rid of it again.

Oh, that's the other thing I wanted. It actually does, it includes copies of some game files (maps/town/props/vehicle_mazda_sw/mazda_SW_brown.xml for example), I guess you included them by mistake.

Link to comment
Share on other sites

It is a problem of the code that selects the submaps. It doesn't use the normal resource loading functions, so I missed it when adding modular support (IOW: it doesn't work with mods at all). I'll fix this for 0.31.

The mod on its own is correct and will work with 0.31.

Fair enough, this seemed to be working with FitH. Must have just been getting the standard two submaps for UFOs.

Link to comment
Share on other sites

Thx. Yeah, should be no prob to do that, will do later when XCE gets to 0.31 :)

BTW - is there actually a way to control how many of a given car appear in a map?

So far in my test the random placement was ok, but sometimes you could end up with clusters of the same vehicle/same color in one map. Not a complaint, just an observation.

Thing is, I had the idea to make certain specific variants, for example an ambulance variant of the van. Or a police car. But I guess we don't want to see ambulances/police cars all over the place in maps so I kinda wondered about "unique" placement.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...