Jump to content

Custom tile And Movement Cost


Falidell

Recommended Posts

is there a way currently to increase the cost of movement on specific tiles. i'm currently making some ground rocks that serve only to slow Characters down by increasing TU cost over the tile. similar to how the coral here works. see those coral? they use 2x the TU cost to move over. i want to bring similar mechanics into my maps. Deserts have rocks you ever try running over rocks?(not tiny rocks decent size rocks)

inset3_10_0819_xcom.jpg

Link to comment
Share on other sites

thats pretty much the plan right now i'm working on the desert levels. so small rocks, large rocks that you walk over but slow you down, tall grass, shrubs, bushes, other type of non-cover props that add visual appeal aswell as certain stuff that forfill strategic purpose

Edit Kinda like this but with more variation.. i still need to make the desert grass atm i'm using the farm grass

Kinda_deserty_Fal.jpg

Kinda_deserty_Fal.jpg

Kinda_deserty_Fal.jpg.20ee65bf58280af13f

Edited by Falidell
Link to comment
Share on other sites

Basically a specter is a xml doc that contains all the stats and information of the tile you make. just remember to save the tile as a png with a 100% alpha background. which can all be made within the submap editor. here is some more information on that matter. http://www.goldhawkinteractive.com/forums/showthread.php/5341-How-to-map-and-submap-in-Xenonauts

altho i think you need a template specter to get it started.... at least thats what i've been doing.

here is the one for the desert 1x1 cover rock that comes with the game

<?xml version="1.0" ?><spectre id="[color=#00FF00]desert/cover/rock_cover_1x1_1[/color]" width="1" height="1" version="1">   <[color=#FF0000]state id="damaged"[/color] name="" pivotX="96" pivotY="128" pathScore="1" objectTypePreset="3" visibilityScore="1.000" bulletScore="0.500" orientation="0" sortPoint="0.500" hp="400" isCover="1" coverAnimName="lean" wallType="crushing" destructionSound="Destruction Dirt">       <image src=[color=#0000FF]"tiles/desert/cover/rock_cover_1x1_1_damaged.png[/color]" />   </state>   <[color=#FF0000]state id="default"[/color] name="" pivotX="96" pivotY="128" pathScore="1" objectTypePreset="3" visibilityScore="1.000" bulletScore="0.500" orientation="0" sortPoint="0.500" hp="200" isCover="1" coverAnimName="lean" wallType="crushing" destructionSound="Destruction Dirt">       <image src=[color=#0000FF]"tiles/desert/cover/rock_cover_1x1_1.png"[/color] />   </state>   <[color=#FF0000]state id="destroyed"[/color] name="" pivotX="96" pivotY="128" pathScore="1" objectTypePreset="0" visibilityScore="1.000" bulletScore="1.000" orientation="0" sortPoint="0.500" hp="0" wallType="none">       <image src=[color=#0000FF]"tiles/desert/cover/rock_cover_1x1_1_destroyed.png" [/color]/>   </state></spectre>

this would be whats in that xml doc

the Green is how the game will identify the tile.

the blue is the actual images the game will use depending on what 'state' the tile is in i colored the states red

now in there there are some fun stuff to play with within the submap editor

submapSpecterimage.jpg

before we begin create a new submap 1x1 name it whatever it doesn't matter because it won't be saved

now open your template spectre via "Add Spectre" if you don't have a submap open the editor will crash. thats why we create the 1x1 submap other then the visual alignment

TileSize || obvious

State || which one are we editing

Texture || where is our tile image

Texture Type || almost always Static Animation would be for smoke and the like

OverlayTexture || not sure really

Name || no idea

Pivot || these are how you will align your tile to the game tiles click-hold and it will keep going

PathScore || from what i can tell this is a multiplier to how many TU's it requires to move over this tile. 1=normal 2= 2x

Object Type || what is it? if it's really none of the defaults set to custom

Crushable || is it? as in if something goes over it will it change it's state to damaged? if so then by what? set to passable if stuff like grass

StoppingChance || what percentage of accuracy does this tile modify the accuracy along the aim line?

visability score || units behind this tile what percentage do we have to see them?

sortPoint|| no idea

blah

blah

blah

yea thats really all the fun stuff

submapSpecterimage.jpg

submapSpecterimage.jpg.b1a8b79b9459bdd1e

Edited by Falidell
corrected Stopping Chance
Link to comment
Share on other sites

Wait, have you tested a pathScore greater than 1 acting as a multiplier? I figured it was a binary input, so 0 for impassable and 1 for passable. That'd be huge: there's already tall grass and corn sprites lying around in tiles\Farm\, so it'd be easy to put in slower ground.

No idea what that means, but I guess I'll cross the bridge if I ever get there. Thanks for the info, man.

If you can't get spectres working, make a thread with your sprites in. I know I'd be willing to create the spectres if need be.

Link to comment
Share on other sites

i've tested the pathscores 0 1 and 2 and work as expected 0=0tu 1=4tu 2=8tu so thats been a great help so far in my development. still so much experimentation and learning to do with this game's editors and the game itself but it's slowely coming together

Link to comment
Share on other sites

Thansk Falidell, that is actually very helpful and will definitely come back to this thread when I start making sprites/maps. Thanks for putting all that effort in explaining what everything does.

Ol'Stinky, you'll be the first to know if I ever make any new sprites or edit the current ones.

Link to comment
Share on other sites

i've tested the pathscores 0 1 and 2 and work as expected 0=0tu 1=4tu 2=8tu so thats been a great help so far in my development. still so much experimentation and learning to do with this game's editors and the game itself but it's slowely coming together

I've been taking the wiki on its word in this regard. This is a really cool find, nice stuff.

A word of warning: there's currently a bug where smoke sets fire to various low health props. You can accidently set a field of tall grass on fire with a single smoke grenade. Make sure you have a safe path for soldiers to go through for the time being. I'm going to have to go and re-do some farm maps because of this, don't end up like poor Ol' Stinky!

Link to comment
Share on other sites

If you can't get spectres working' date=' make a thread with your sprites in. I know I'd be willing to create the spectres if need be.[/quote']

For now I'd like to just edit a few of the PNGs between projects and see if I can come up with something. Where are the PNGs for the props stored?

Link to comment
Share on other sites

Xenonauts->Assets->tiles

although there are a lot of hidden tiles still packed within the GC.Tiles.pfp so if you notic you can't find some of them within the tiles folder somewhere do this

|

|

\/

To be able to create maps and submaps there is a guide on the WIKI page.

http://xenowiki.goldhawkinteractive.com/index.php?title=Mapping:_Creating_new_in-game_battlefields

However, to use them properly you will need to unpack your tiles folder

Instructions

1) Use QuickBMS - click name at top of page found HERE

2) Download the play first PFPK Script (I have hosted it on dropbox to make easier) Also on thesame page. HERE

3) Once both have been downloaded, unpack and run quickbms.exe

4) Point quick BMS to where you saved the PFPK script.

5) Point it to tiles archive GC.tiles.pfp

default= progam files (x86)\steam\steamapps\common\xenonauts\assets

Extract files to xenonauts\assets\tiles

(type in 'tiles' when it asks for location and it creates a folder called tiles in your assets directory.)

Leave it for a few minutes to unpack the tiles archive.

Now run GCLevelEditor or GCSubmapEditor- both in Xenonuats folder- and start developing those custom maps. I suggest you read the instructions now :D

(Credit to Lt Parson for the original instructions and discovery)

Link to comment
Share on other sites

  • 2 weeks later...

I'm wondering if path score can be set in increments smaller than whole numbers. It would seem to only have applications in 1/2 or 1/4 increments.

Also, I'm curious as to the upper and lower limits on this number. Imagine some tile having a negative number applied. There may not be a practical application for that, but wouldn't it be fun?

Edit:

Well, that was a lot of fun!

Turns out that only whole numbers are used. Decimal points and the numbers that follow are ignored.

Haven't tried much in the way of upper limits yet. Highest tested was a 3, making 3x movement costs (though turning on the spot is unaffected).

Negative numbers is where the most interesting results were observed. Making a path selection over negatively scored tiles shows red path squares, just like when you don't have enough TUs to move there.

But wait! What's this? Where is the negative symbol indicating how many units you don't have to get there?

You actually gain TUs going over these tiles at a rate proportional to what you would lose if the path score were positive.

But the algorithm for path selection makes this hilarious. It will do everything it can to lose the least number of TUs possible getting from point A to point B. This means that when your soldier standing in a field of tiles scored -2 is instructed to walk to the tile next to him, he will walk on as many other tiles in that field as possible because "losing" -8 TUs is far worse than "losing" -800 TUs.

I think there is much fun to be had here.

Conclusion: "Let's do the time warp again!"

Edited by Moonfire
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...