aliens

Author Topic: Trying to add new alien craft.  (Read 7699 times)

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #15 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

/anyway

Quote
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)

Quote
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)

Quote
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 ...

Quote
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

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Trying to add new alien craft.
« Reply #16 on: April 18, 2023, 02:03:20 pm »
. Right click an empty tile to create a new node.

Yes.

. Select one of the Link1 through Link5 options
. Assign "Dest" to the number of another existing Node.

...or you can just right-click a differnt node when the first one is active, the editor will automatically create a link.
Make sure to have the "link forward and back" button active, so you don't have to do this manually both ways.
@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.

. Assign "Unit" to the type (Or any if all aliens) are able to move from the selected node to that "Dest" node.

Like KevL said, make sure a large unit can fit and get there (no small doors etc.). If yes, "Any" is fine; if not, set it to "Small".
Flying unit options should be obvious.

. 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.

You don't have to set patrol routes, they're only for priority. So 0 is fine too. I usually set non-0 patrol values on choke points, to make sure that units go there at least sometimes, but it's a design choice.

. 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.

To clarify: AFAIK all this only matters for the patrol mode. Once the enemy spots your soldiers, it switches to combat mode and stops caring about nodes.

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.

All correct, but in most cases "Civilian/Scout" is enough. Such nodes have lower spawn priority, but can spawn any non-X-Com unit. Most of the time I only bother with ranks for obvious places, like engine rooms (Engineers) or bridges (Leaders/Commanders), or sometimes choke/vantage points (Soldiers). It's quite situational, so mostly a matter of practice. When in doubt, leave it as "Civilian/Scout".

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?

Yes, they will path around obstacles.

To make sure I'm understanding this correctly as an example I've altered UFO_GT0006-1.RMP from this:
(...)
With this new node between the two alien crafts aliens can choose to move to from node 1 or node 6 to node 49.

Yes, I should have made this connection myself, but I forgot, sorry. :)
You did it correctly, although patrol priority 1 is not required (but still perfectly okay, if you want the aliens to go to this point in particular more often than most other notes).

The "&" "*" method looks very useful. I was only aware of using refNode: to do something like this:
Code: [Select]
items:

  - &STR_EXAMPLE_ITEM
    type: STR_EXAMPLE_ITEM


  - type: STR_DUPLICATED_SECOND_EXAMPLE_ITEM
    refNode: STR_EXAMPLE_ITEM

As far as I can say, it's a different feature.

If I understand correctly the contents of the "terrains:" list is the only thing being duplicated when "terrains: *Urban" is written elsewhere in the code. It isn't also duplicating these lines:
Code: [Select]
    category: Urban
    group: UFO - Terrain

An anchor only repeats a single line, and any sublines it might have. For example:

Code: [Select]
armors:
  - type: STR_MEGAWORM_ARMOR
    [blah blah blah armour data]
    psiDefence: &StandardDynamicPsiDefence
      psiStrength: 1.0
      psiSkill: 0.4
      moraleCurrent: 0.33
      bravery: 0.2
    [blah blah blah more armour data]

  - type: STR_SWARMIDS_LARGE_ARMOR
    [blah blah blah armour data]
    psiDefence: *StandardDynamicPsiDefence
    [blah blah blah more armour data]

In this case, instad of repeating the same psi defense formula on moany armours which use it, I only type it once and then refer to it with the anchor.

Can I use this in any YAML .rul file wherever a list was going to be?

Yes, your example looks good.


Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #17 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

General|StartConnector

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

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

good to hear  :^)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Trying to add new alien craft.
« Reply #18 on: April 18, 2023, 05:36:58 pm »
look in RouteView Options

General|StartConnector

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

Thank you. Works like a charm!

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Trying to add new alien craft.
« Reply #19 on: April 19, 2023, 06:06:55 pm »
Finished adding routes to Wolwerin's Dreadnought (UFO_GT0002)
Spoiler:



Here are the files:
. UFO_GT0002-4.MAP
. UFO_GT0002-4.RMP


Code: [Select]
    terrains:
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3

Floor 1:
Spoiler:

Floor 2:
Spoiler:

Floor 3:
Spoiler:

Here is the current total number of spawn points for the map:
Spoiler:

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

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

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


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 ?
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.
Spoiler:


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
Thank you for pointing that out, I'll just have to be careful.


Like KevL said, make sure a large unit can fit and get there (no small doors etc.). If yes, "Any" is fine; if not, set it to "Small".
Flying unit options should be obvious.
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?

For example Node 66 in the UFO_GT0002-4.RMP file is setup to prevent large units from trying to use the small elevator tiles:
Code: [Select]
Link1: 64 = Any
Link2: 67 = Small
Link3: 67 = FlyingSmall
Link4: 71 = Small
Link5: 71 = FlyingSmall

Could Node 66 have been written this way instead and the FlyingSmall units would have still have been routed to Node 67 & 71?
Code: [Select]
Link1: 64 = Any
Link2: 67 = Small
Link3: 71 = Small
Link4: Unused
Link5: Unused
« Last Edit: April 19, 2023, 06:47:42 pm by The Martian »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #20 on: April 20, 2023, 12:55:58 am »
Here are the files:

again loaded fine here

Quote
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:
https://www.ufopaedia.org/index.php/Alien_Rank

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 ...

Quote
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.

Quote
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

Quote
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]

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #21 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 ...

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Trying to add new alien craft.
« Reply #22 on: April 20, 2023, 01:27:27 pm »
I've finished adding the routing nodes for Wolwerin's "Intimidation Of The Government" (GT0007) craft. That leaves five more maps to go.
Spoiler:


. UFO_GT0007-1.MAP
. UFO_GT0007-1.RMP

Code: [Select]
    terrains:
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3



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?

Example:
Spoiler:
Code: [Select]
    terrains:
      - UEXT2
      - UEXT3
      - UINT1
      - UINT2
      - UINT3


  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?


Just for fun I added alien routes to one of Wolwerin's maps (Titan - Heavy Transport) that was meant to be an X-Com craft, but I'm getting the following error:
"There are 88 route-nodes outside the bounds of the map"
Spoiler:

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

Spoiler:


. TITAN_ALIEN_EDIT.MAP
. TITAN_ALIEN_EDIT.RMP

Code: [Select]
    terrains:
      - Triton
      - UINT2

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


here's some notes and code in Mv2 ...
Thank you that was very helpful.
« Last Edit: April 20, 2023, 01:36:31 pm by The Martian »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #23 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 )

Quote
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:

Quote
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

Quote
. TITAN_ALIEN_EDIT.MAP
. TITAN_ALIEN_EDIT.RMP

Code: [Select]
    terrains:
      - Triton
      - UINT2

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

Quote
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)
« Last Edit: April 20, 2023, 03:55:46 pm by kevL »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #24 on: April 21, 2023, 02:08:14 am »
The Ruleset Reference defines these ranks:

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Alien_Races
    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
each:

https://github.com/OpenXcom/OpenXcom/blob/82b7b11b70f5e54a3e876f6eeec755c13e2dae50/src/Savegame/Node.cpp#L57
Code: [Select]
const int Node::nodeRank[8][7] =
{
{ NR_LEADER,    NR_NAVIGATOR, NR_ENGINEER,  NR_MISC2,   NR_MEDIC,     NR_SOLDIER, NR_SCOUT }, //commander
{ NR_LEADER,    NR_NAVIGATOR, NR_ENGINEER,  NR_MISC2,   NR_MEDIC,     NR_SOLDIER, NR_SCOUT }, //leader
{ NR_ENGINEER,  NR_LEADER,    NR_NAVIGATOR, NR_SOLDIER, NR_MEDIC,     NR_MISC2,   NR_SCOUT }, //engineer
{ NR_MEDIC,     NR_MISC1,     NR_SOLDIER,   NR_MISC2,   NR_NAVIGATOR, NR_LEADER,  NR_SCOUT }, //medic
{ NR_NAVIGATOR, NR_LEADER,    NR_ENGINEER,  NR_SOLDIER, NR_MEDIC,     NR_MISC2,   NR_SCOUT }, //navigator
{ NR_SOLDIER,   NR_ENGINEER,  NR_NAVIGATOR, NR_LEADER,  NR_MISC1,     NR_MISC2,   NR_SCOUT }, //soldier
{ NR_SOLDIER,   NR_ENGINEER,  NR_NAVIGATOR, NR_LEADER,  NR_MISC1,     NR_MISC2,   NR_SCOUT }, //terrorist
{ NR_SOLDIER,   NR_ENGINEER,  NR_NAVIGATOR, NR_LEADER,  NR_MISC1,     NR_MISC2,   NR_SCOUT }  //also terrorist
};

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.

https://github.com/OpenXcom/OpenXcom/blob/82b7b11b70f5e54a3e876f6eeec755c13e2dae50/src/Savegame/Node.h#L26
Code: [Select]
enum NodeRank
{
NR_SCOUT = 0, // 0
NR_XCOM, // 1
NR_SOLDIER, // 2
NR_NAVIGATOR, // 3
NR_LEADER, // 4
NR_ENGINEER, // 5
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 ...

https://github.com/kevL/OpenXCOM.Tools/blob/4bceb6656de9e300d48dcb98b4fba13668788b61/XCom/RouteData/RouteNodeEnum.cs#L58
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 ...

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Trying to add new alien craft.
« Reply #25 on: April 21, 2023, 11:15:48 am »
The Ruleset Reference defines these ranks:

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Alien_Races
    0 - Commander
    1 - Leader
    2 - Engineer
    3 - Medic
    4 - Navigator
    5 - Soldier
    6 - Terrorist 1
    7 - Terrorist 2
I think this should not me named "alineRank" but "alienDeployRank", as this is independent of alien ranks names (and probably commendations).
Overall this is bit mess and I have plan to make some cleanups in OXCE to make it more reasonable.

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #26 on: April 22, 2023, 03:22:17 am »
hm, yeh ... i see that alienRaces.rul defines ranks per the race-type

eg.

Code: [Select]
  - id: STR_ETHEREAL
    members:
      - 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]
  - id: STR_SECTOID
    members:
      - STR_SECTOID_COMMANDER
      - STR_SECTOID_LEADER
      - STR_SECTOID_ENGINEER
      - STR_SECTOID_MEDIC
      - STR_SECTOID_NAVIGATOR
      - STR_SECTOID_SOLDIER
      - STR_CYBERDISC_TERRORIST
      - STR_CYBERDISC_TERRORIST

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

Code: [Select]
  - id: STR_AQUATOID
    members:
      - STR_AQUATOID_COMMANDER
      - STR_AQUATOID_NAVIGATOR
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_SOLDIER
      - STR_CALCINITE_TERRORIST
      - STR_CALCINITE_TERRORIST

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

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Trying to add new alien craft.
« Reply #27 on: April 22, 2023, 08:31:44 pm »
I went back over the maps and changed the routes to use the scout feature for spawning new units.

Here are all of Wolwerin's TFTD craft maps with the new routing.

Wolwerin's TFTD Maps.zip

I'm still testing the maps to see if I spot any holes in them like with the "Double Hunter" (GT0006) map, but I think they are close to ready.


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.

Any idea what could be causing this?

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. (Example: Empty Map with routes.zip)

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?


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?


Example:
An alien craft = UEXT2, UEXT3, UINT1, UINT2, UINT3 = +100 MCD Records
X-Com's craft = TRITON = +46 MCD Records
The battle location = SAND, ATLANTIS, UFOBITS = 102+ MCD Records

When the mission loads that's already almost at the max tile limit with a total of 248.
« Last Edit: April 22, 2023, 09:14:09 pm by The Martian »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Trying to add new alien craft.
« Reply #28 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 ...

Quote
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?

Quote
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 ...

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Trying to add new alien craft.
« Reply #29 on: April 22, 2023, 10:10:59 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.


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:
Spoiler:

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 ...
That is great news. 253 is a lot to work with.
« Last Edit: April 22, 2023, 10:16:43 pm by The Martian »