Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - kevL

Pages: 1 [2] 3 4 ... 31
Help / Re: When creating new maps are corner pieces only cosmetic?
« on: April 28, 2023, 10:59:51 am »
pretty sure that the OxC engines successfully block view between diagonally touching LoFTs (unlike the original XCOM).

But I believe it's good policy to 'cap off' corners for other reasons that i forget ...

Help / Re: Trying to add new alien craft.
« on: April 24, 2023, 02:14:02 pm »
I've redone the routing for the Whirligig map, could you check if the files are loading now with the correct routes on your end?

yep looks fine here. (same as the pics u posted)

Help / Re: Trying to add new alien craft.
« on: April 23, 2023, 09:28:31 am »
Here is a note that may save someone who is searching this thread later a bit of trouble: If your map loads fine in MapView 2 but looks distorted when loaded in OpenXcom.

Check your ufo: entry for that craft's map and make sure the mapDataSets: contains BLANKS before the rest of your tile sets.
Code: [Select]

      - BLANKS # <========= Make sure to add this
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3

good pt. For the technically minded: BLANKS.MCD contains 2 tileparts and they are automatically inserted into every missionsite's terrainset. Hence Mv2 regards them as redundant and silently accounts for them. (Those 2 tileparts are the reason that the maximum tilepartID on a Map is limited to #253 instead of Byte.MaxValue=255. That could have been treated redundantly also, btw /sigh)

The Whirligig map is one I made.

I looked more closely at the Whirligig -- nice Map! But the RMP nodes have nothing to do with what I see in the tileset ... so i don't know where you (or Mapview) got that routefile from ...

A thought that crossed my mind is that since you're on Linux the filesystem is case sensitive; iirc, Mv2 sometimes respects case sensitivity and sometimes not ... iirc I couldn't quite make my mind up as to whether or not that should be respected, since Windows filesystem typically doesn't care about the case sensitivity of paths and/or filenames ... so whether you're on Linux or Windows (or whatever) it's GoodPolicy[tm] to follow the case sensitivity conventions that the original games used -- basically use UPPER case for the relevant subdirectories and filenames/extensions.

So maybe, just maybe, you had two RMP files with the same name but in different cases that created a conflict for Mapview ...

(avoid spaces also -- in fact just use alphanumeric and underscore characters)

I mean, lots of things will work with more than that, but the original map-related resources appear to be firmly based in ASCII Uppercase characters.

have been looking through the load-routines (in Mv2) and don't see anything that's blatantly restrictive ... it pretty much assumes that user "knows what's going on" ...

I'm guessing this is not the case but would the map and route files having a dash then number before the file extension cause this problem?

I've been saving map versions like this as I work on them:
Code: [Select]

Maybe. ( see my opinion above )

So far I have not encountered the route problem again. I've been working around it by keeping a backup of the .MAP / .RMP files in a separate folder just in case I need to revert the .RMP if it corrupts.

good to hear. I figure that once you get a hang of things and follow basic conventions, Mapview will work fine for ya

If you have a .CHM helpfile reader on Linux i suggest taking an extended browse through MapView.chm .....

Help / Re: Trying to add new alien craft.
« on: April 22, 2023, 10:50:33 pm »
The exact steps I've been doing:
Code: [Select]
. Start MapView 2
. Expand the tftdShips tree so that Craft & USO are visible.
. Select "USO" by Left click.
. Right Click "USO" and select "Add Tileset"
. In the MAP field either type the name of a new map, or click "..." and select an existing map file.
. Click create.
. Select (UEXT2, UEXT3, UINT1, UINT2, UINT3) and move each to the "allocated" window by pressing the "Left" button.
. Click Accept.

I also may have selected the "Save Maptree" option in the "File" menu in the past either right after creating the map or after working on it a bit.

I just tried it again and this time it created a 10x10 file with no routes.

Now that I know it should be 10x10 by default I'll keep an eye out for that, if the new map starts with anything else I'll assume it is corrupted and try to make another one.

it kinda sounds like maybe you typed in the name of an existing Map ... really not sure tho.

I think the routes on the empty example map came from this craft's map 'Whirligig'. Interestingly the Whirligig's map also seems to have now started using yet other crafts routes and is throwing this error when I click on it:

i have no idea where that map came from /shrug

Help / Re: Trying to add new alien craft.
« on: April 22, 2023, 09:21:11 pm »
whenever I try to make a new map there are already routes, it seems to be inheriting them from a different crafts map. Also sometimes adding a new map seems to corrupt a different map file causing the other map to use another craft's routes instead of its own.

An idea what could be causing this?

not really. It's possibly a filename MAP/RMP conflict wrt files in different directories on your hardrive -- but that's unlikely since Mapview2 finds the MAP and RMP files given a label (filename without extension) and a basepath (parent of the MAPS and ROUTES directories).

This is the first I've seen or heard of it, and to debug it I'd need a minimum case with *exact* steps to repro ...

Here is an example, I just created this map with the "Add Tileset" command and it started with an empty map but it has the routes from a different craft already present.

Perhaps I'm creating the file initially incorrectly, the method I'm using is to click USO and select "Add Tileset" then add the (UEXT2, UEXT3, UINT1, UINT2, UINT3) terrain tile sets using the menu. Should I be doing something else?

sounds good enough, but I know you're doing more than that because a new Map is 10x10 tiles and the example has 30x30 ... :\

The routes have a distinctive pattern; so, what Map do they come from?

I have another question about the tile limit. Is 253 just for the alien craft being made in MapView itself or does the sea floor and whatever X-Com craft the player sends to the location also count towards the limit when the file is loaded ingame?

pretty sure that the 253 ID limit is only for the mapblock that you're working on. Ie, the game engines likely use a 32-bit integer that relaxes the limit ...

Help / Re: Trying to add new alien craft.
« on: April 22, 2023, 03:22:17 am »
hm, yeh ... i see that alienRaces.rul defines ranks per the race-type


Code: [Select]
      - STR_ETHEREAL_COMMANDER # commander
      - STR_ETHEREAL_LEADER    # leader
      - STR_ETHEREAL_LEADER    # engineer
      - STR_ETHEREAL_LEADER    # medic
      - STR_ETHEREAL_LEADER    # navigator
      - STR_ETHEREAL_SOLDIER   # soldier
      - STR_SECTOPOD_TERRORIST # terrorist 1
      - STR_SECTOPOD_TERRORIST # terrorist 2

hm, i think i see how to resolve my UFO vs TFTD dilemma ...

here's a full featured race in UFO (only terrorist is doubled):

Code: [Select]

and here's a full featured race in TFTD (only terrorist is doubled):

Code: [Select]

so (ufo)leader becomes (tftd)navigator, engineer becomes medic, medic becomes technician, navigator becomes squadleader, soldier stays the same, so do terrorists 1/2 ... and ofc Commander.

So ... at least according to this reasoning, my Mapview enums are okay :^)

Tks for the poke, Mr Yankes

Help / Re: Trying to add new alien craft.
« on: April 21, 2023, 02:08:14 am »
The Ruleset Reference defines these ranks:
    0 - Commander
    1 - Leader
    2 - Engineer
    3 - Medic
    4 - Navigator
    5 - Soldier
    6 - Terrorist 1
    7 - Terrorist 2

then to make decisions about spawning/patrolling, the OpenXcom code uses the
following mapping, using a 2-dimensional array with 8 categories of 7 node-ranks
Code: [Select]
const int Node::nodeRank[8][7] =

As seen at the right of the table, the alien ranks correspond to those listed in
the Ruleset Reference. That is, a Medic looks for a Medic-node first, then a
Terrorist1-node, then a Soldier-node, etc ... and finally falls back on a
Scout-node (if a more suitable node isn't found).

Basically a "scout" flag is set if nodes of a proper alien rank are not found
for that alien. This (perhaps) allows it to patrol nodes of any rank ...
including leaving one block for another block.

The curmudgeon is that alien-unit ranks and route-node ranks don't match up in a
1:1 relationship.
Code: [Select]
enum NodeRank
NR_SCOUT = 0, // 0
NR_XCOM, // 1
NR_MISC1, // 6
NR_MEDIC, // 7
NR_MISC2 // 8

And further that UFO alien ranks don't seem to bear a 1:1 relationship with TFTD
alien ranks ...
Code: [Select]
public enum NodeRankUfo
CivScout, // 0
XCOM, // 1
Soldier, // 2
Navigator, // 3 vs SquadLeader
LeaderCommander, // 4 vs Navigator/Commander
Engineer, // 5 vs Medic
Misc1, // 6
Medic, // 7 vs Technician
Misc2, // 8
invalid // 9 - WORKAROUND.

public enum NodeRankTftd
CivScout, // 0
XCOM, // 1
Soldier, // 2
SquadLeader, // 3 vs Navigator
NavigatorCommander, // 4 vs Leader/Commander
Medic, // 5 vs Engineer
Misc1, // 6
Technician, // 7 vs Medic
Misc2, // 8
invalid // 9 - WORKAROUND.

and at that point, how to mod your routes becomes a bit arbitrary ... this is
the mechanic of the original games (UFO/TFTD) and we're just sort of stuck with
it ...

Note that i now lack confidence in my NodeRankTftd enum ...

Help / Re: Trying to add new alien craft.
« on: April 20, 2023, 03:44:53 pm »
When using "Add Tileset" to place a new map in the Maptree, what are the limits to the number of tile packs that can be assigned to each map?

It's not the number of packs but the count of McdRecords in all packs total. 254 is the MaxMcdRecords that can be allocated (the highest ID is #253). The limitation is in the Mapfile format -- 1 byte=256 but 2 records are reserved. There can actually be more than 254 records allocated, as long as no parts with an ID higher than #253 are assigned to a slot on the Map itself.

(so you could actually design MCD files that end up with "destroyed" parts that are greater than #253 ... but that's advanced )

I noticed that in modify map size I can set the map to be taller than original X-Com height limit, what is the maximum height that I can build a new map at?

not sure. But, because of a routine used to adjust routenode levels, not much more than 100. Certainly no more than 125 ... I mean it can be done but if you then go shifting the 0-level up and down (by adding and subtracting levels from top and/or bottom) the levels of the routenodes are probably gonna go completely whack.

In fact Im wondering if that has something to do with this:

I'm getting the following error: "There are 88 route-nodes outside the bounds of the map"

I thought that I had placed them all inside the map tiles so I'm not sure what has gone wrong.

well, routenodes can't be placed outside the bounds of the map


Code: [Select]
      - Triton
      - UINT2

Those files loaded fine for me. There were no out-of-bounds nodes detected ...

Just by placing this tile is enough to make an elevator right?

i don't know. As far as I'm aware there needs to be a floorpart with "isGravLift" flagged in its MCD record, and another floorpart with its "isGravLift" flagged, and the two need to be lined up vertically ...

ps. Here's a gravlift (attached)

Help / Re: Trying to add new alien craft.
« on: April 20, 2023, 02:00:47 am »
here's some notes and code in Mv2 ...

remember that notes are merely notes ... might not be accurate.

Code: [Select]
// Rules on nodes and node-links (OxC)
// - unittype is used for spawning and patrolling only; it is not used by
//   links
// - noderank affects both spawning and patrolling, but note that noderank
//   has a fallback mechanic for spawning such that if no node with an
//   aLien's rank is found, a succession of (all) other ranks will be
//   investigated (but not XCOM rank ofc)
// - re. unittypes: small units are allowed to use large nodes but not vice
//   versa and flying units are allowed to use non-flying nodes but not vice
//   versa. Thus 'Large' nodes are effectively identical to 'Any' nodes.
// - link distance is not used
// - spawnweight 0 disallows spawning at a node, but patrolpriority 0 is
//   valid for patrolling to a node if a unit is flagged, by OxC, to "scout"
//   (details tbd) else patrolpriority 0 disallows patrolling the node: the
//   OxC "scout" flag appears to be, at least in part, another fallback
//   mechanic - that is, an aLien will check for valid non-scout nodes first
//   but if none are found, the routine then checks for valid "scout" nodes.
//   But don't quote me on that; there's more going on between (a)
//   patrolpriority, (b) noderank, and (c) the "scout" flag ...
// - it appears that if the OxC "scout" flag is not set, then the aLien to
//   which it's being applied will not leave the block it's currently in.
//   More investigation req'd
//   - quote from the OxC code:
//       "scouts roam all over while all others shuffle around to adjacent
//        nodes at most"
//   I believe, at a guess, that this is designed to keep Commanders in the
//   command module, eg, or at least increase the chance of aLiens sticking
//   around their non-CivScout patrol nodes. Long story short: OxC has
//   hardcoded patrolling behavior beyond what can be determined by the
//   Route files. (I didn't look at OxCe)
// 0 = Any, 1 = Flying, 2 = Flying Large, 3 = Large, 4 = Small <- UfoPaedia.Org BZZZT.

public enum UnitType
: byte // ca1028 - use Int32
Any, // 0
FlyingSmall, // 1
Small, // 2
FlyingLarge, // 3
Large // 4 - aka. 'Any'

public enum NodeRankUfo
: byte // ca1028 - use Int32
CivScout, // 0
XCOM, // 1
Soldier, // 2
Navigator, // 3
LeaderCommander, // 4
Engineer, // 5
Misc1, // 6
Medic, // 7
Misc2, // 8
invalid // 9 - WORKAROUND.

public enum NodeRankTftd
: byte // ca1028 - use Int32
CivScout, // 0
XCOM, // 1
Soldier, // 2
SquadLeader, // 3
LeaderCommander, // 4
Medic, // 5
Misc1, // 6
Technician, // 7
Misc2, // 8
invalid // 9 - WORKAROUND.

I think i just need to change NodeRankTftd.LeaderCommander to NodeRankTftd.NavigatorCommander ...

Help / Re: Trying to add new alien craft.
« on: April 20, 2023, 12:55:58 am »
Here are the files:

again loaded fine here

Does the TFTD Navigator rank share the Leader/Commander rank, I didn't see it listed in the "Node Data" "Node Rank" menu.

Not sure, will take a closer look ... there seem to be some differing opinions about how ranklabels correspond between UFO and TFTD. (ie, i was never completely comfortable with it, or it could just be an oversight on my part)

here's one table but have seen others:

And NOTE that just because they're listed side by side like that doesn't mean their integer values correspond. so ... ill have a closer look ...

I'm getting an error when I press the "tally" button in the RouteView window:

I tried deleting Node 67 but the error still appears when I press the "tally" button.

Mv2 is telling you that the Map UFO07 has an invalid noderank. Several of the stock TFTD routefiles have noderank 9. but there is no rank 9 ...

if you open that Map and go to the 3rd floor, along the west wall there should appear a dark node. Select it and its NodeRank is INVALID.

I don't play TFTD but i believe there's a TFTDPatch that fixes many of those irks ... or fix it or leave it ...

the OxC/e engines very likely deal with such discrepancies in their way.

It was caught by Mv2 because its tileset is in the same Category as the one that was tallied; ie, it's not in the routefile that's currently displayed in RouteView.

When I click a tile in the top view window that already has been assigned floors/walls/etc the images stop being black for those parts.

ok -- it sounds like things are functional

Do I need to duplicate routes from the same node for both "Small Flying" and "Small", or will a small flying unit also use a route marked with just a "Small" route?

no need to duplicate routes. A small flying unit can use a Small route. So the extra links you mention are redundant

[to be honest I'm not entirely sure that the Link unittypes get evaluated, but fill them in to be consistent]

Help / Re: Trying to add new alien craft.
« on: April 18, 2023, 02:19:24 pm »
@kevL: After making hundreds, or perhaps thousands of maps, I can't recall a single case where "link forward and back" should be off. Even if it ever happened, it's super rare. Can we please make the "link forward and back" button pressed by default? It would be one click less for me every session.

look in RouteView Options


i have mine set at "2" (link foward and back) and whenever Mv starts its selected.

You don't have to set patrol routes, they're only for priority. So 0 is fine too.

good to hear  :^)

Help / Re: Trying to add new alien craft.
« on: April 18, 2023, 01:47:23 pm »
Thank you KevL, I appreciate the screenshot:

so i assume that, when you click/select a tile that has parts assigned, the partsprites draw ok in TopView's partslots or "quadrants" as i call them ?

( i hope so because I'm quite involved with other stuff atm ... and unfortunately I'm not particularly hopeful about resolving the monotone spriteset glitches since i can't repro it here )

Another glitch i notice is the two small priority bars on routenodes are not filling correctly. If you look closely you can see red and blue colors in them ... red reflects spawnweight and blue for patrolpriorty. But WINE (or whatever) seems to be truncating/rounding off the location and size of the fill-colors a bit differently than .NET


Here is the edited map and route files for Wolwerin's Double Scout (GT0005)

the MAP and RMP loaded fine for me here (in mv2)

If I've done this correctly the map now supports this many spawn points inside the alien craft:
Soldiers: 5
Squad Leader: 1
Medics: 1
Technician: 1
Leader/Commander: 2
Terror #1: 1
Terror #2: 1

Note that the "tally" button in RouteView shows (see attached)

I've also made it so that if Terror units #1 or #2 are used for a flying unit it will move to a patrol pattern above the ship.

... yeh u can sink a lot of time into routes ...

Do I need to set "Patrol Priority" to "1 : Lo" for every node or can I leave them at "0 : LoLo" and still have the AI use them?
(UFO_GT0005-3 is setup to use "1 : Lo" for almost all the nodes.)

 I *think* they can be left at 0 LoLo. At least that's the conclusion i came to when investigating the OxC/e code ... but maybe Solarius could give us better insight ...

on the other hand, SpawnWeight im sure needs at least 1:Lo

Help / Re: Trying to add new alien craft.
« on: April 17, 2023, 10:15:17 pm »
Selecting "UseMono: True" does display the previously blacked out images correctly. However it also causes the program to run at what feels like 1 frame per 60 seconds. (I tried Stoddard's build but the result was the same.)

I think I can work around it for now using the "UseMono: False" setting even with the graphical errors as the only effected areas seem to be the 'Floor' 'West' 'North' 'Content' 'Part' icons in the "Top/Route Views" and the "TopView" windows.

/* snip */ Is this tile normally black in the "TileView" because it fills the currently selected tile with nothing leaving it empty/blank or is it a graphical error caused by me not using the Mono = True setting?

The black sprite in TileView is the eraser (nul part). That sprite is part of the same monotone spriteset that the (black) quadrant-parts are in TopView -- the spriteset is internal (hardcoded). So it's just a graphical error. I'll take a closer look to see if i can see what's making that spriteset so 'special' ...

As long as those quadrants show the actual part-sprites once you click on (select) a tile proper, you should be okay. The (black) sprites in the monotone spriteset are just markers/placeholders ...

To confirm if I understand the RouteView controls correctly, to place and link alien movement nodes:
. Right click an empty tile to create a new node.
. Select one of the Link1 through Link5 options
. Assign "Dest" to the number of another existing Node.
. Assign "Unit" to the type (Or any if all aliens) are able to move from the selected node to that "Dest" node.
. In the "Node data" settings assign it a "Patrol Priority" of at least 1 so that the alien has a chance of wanting to vist that node from other nodes.
. Aliens may now choose to move from the selected node, configuration is complete and up to 4 (5 total) other nodes can be linked from the selected node.

And to make the Node a spawn point for an alien unit:
. Select an existing node.
. In "Node data" select "Node Rank" and assign it the value of the rank of alien to be spawned from the alienRaces: .rul file.
. So long as "Spawn Weight" is set to greater than 0 that tile 'could' be used to place one of the aliens of that type.

sounds reasonable. Solarius has a more practical understanding of routes and map-making so ...

One thing I am wary of when making routes, however, is that large units, which occupy four tiles, need space to spawn and move. The node(s) they spawn at and want to move to seems to be their upper left quadrant, so try to ensure that nodes for large units have the other three tiles unobstructed.

eg. don't let large units try to walk down (or spawn in) singlefile corridors,

Other than that, the nuances of the rules get kinda obscure, and I suspect that experienced modders just try things within reason until they like what works

Do I need to make sure each node links to another node without going through walls or solid objects, or will aliens automatically path around everything to get to the other linked node?

I believe they'll find a path ... with the caveats above.

With this new node between the two alien crafts aliens can choose to move to from node 1 or node 6 to node 49.

Have I done this correctly?
(Node 49: Link1 = 1, Link2 = 6)
(Node 1: Link4 = 49)
(Node 6: Link5 = 49)

it's likely all good -- have a look at the routes of some other Maps to get a feel for it ...

yaml ptrs are not my dep't :|

Help / Re: Trying to add new alien craft.
« on: April 16, 2023, 12:44:34 am »
alternately, the TilesetEditor

Help / Re: Trying to add new alien craft.
« on: April 15, 2023, 03:35:26 pm »
absolutely. If the shoe fits wear it

Pages: 1 [2] 3 4 ... 31