aliens

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 5 ... 32
31
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

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

32
Help / Re: Trying to add new alien craft.
« 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 ...

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

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)

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

35
Help / Re: Trying to add new alien craft.
« 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]

36
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

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  :^)

37
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

/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

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

Quote
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

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

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

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

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

41
Help / Re: Trying to add new alien craft.
« on: April 15, 2023, 08:15:07 am »
I think I've got MapView2 working how do I load a new map into it?

I tried dropping UFO_GT0006.RMP & UFO_GT0006.MAP into the /TFTD/ROUTES/ & /TFTD/MAP/ folders but they don't seem to be appearing in the "tftdShips -> USO" file tree on the "Map Editor" window.

rightclick in the MapTree brings up a menu. (select the node you want to adjust, before choosing an action)

The thing to get used to is that there are 3 levels (of nodes) in the MapTree

GROUP -> CATEGORY -> TILESET (or Map)

so at Group-level you can add a Category, and at Category-level a Map/Tileset can be added ...

Add Tileset brings up the Tileset editor -- that's where your custom stuff gets added (take your time and feel free to ask Solarius questions ;)


iirc, Solarius likes to edit MapTilesets.yml in the /settings folder manually ... but the TilesetEditor ought work ok as well ...


btw, in TopView i notice you're getting blacked quadrants. Could try turning on UseMono in MainView's Options,

42
Help / Re: Trying to add new alien craft.
« on: April 14, 2023, 10:07:27 am »
@The Martian

you could also try Automated builds for Mono only: https://lxnt.wtf/oxem/#/MapView by Stoddard.

sort by Time column to find the latest:
MapView-4bceb665-2022-10-11-mono.7z 10/10/22 6:50 PM 494 Kib

https://github.com/kevL/OpenXCOM.Tools/tree/master/Distribution

Stoddard set up automated builds against my repo ... but see notes at the Distribution link above.

43
OXCE Bugs FIXED / Re: Triton wall bug
« on: February 12, 2023, 01:24:58 am »
Just a small heads up: I've been playing all day with the change I proposed and didn't see any negative side-effect.

just an aside: beware diagonal bigwalls (eg. some UFO hull-tiles) because that step<2 *might* be there to prevent blast propagation through them.

eg. with your change, try hitting one with an incendiary ... see if the fire spreads inside the UFO

44
Help / Re: Issues with adding custom mapblocks to the game
« on: December 29, 2022, 04:12:57 am »
Now only a new "model" i created can't be seen with some other pieces from another terrain file i've found online, they appear black like if it's missing the texture somehow.

i assume that those black images are referenced in a .PCK file? (i haven't modded OxC for quite a while..)

if so, try opening its terrain .PCK in PckView it might give a clue idk

45
Open Feedback / Re: Cool loophole if your general stores are full
« on: October 26, 2022, 09:30:20 pm »
And again, and again, and again...

also dock them $50 .. $1000 bucks each time, that'll get their goats

;)

Pages: 1 2 [3] 4 5 ... 32