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 ... 33
31
Help / Re: EntryPoint vs ExitPoint?
« on: May 16, 2023, 04:00:05 pm »
I still need to use MapView2 and place "Node Rank" "1 : XCOM" spawn nodes on each entry EntryPoint tile to actually make X-Com's units be able to spawn at the start of the battle.

no i don't think so. XCOM spawnnodes are used in aLien base assault missions (ie. when there's not an XCOM landing craft)

[edit] I'm guessing there's a flag in some ruleset or other that you'd set, that tells OxC/e to use either spawnnodes or EntryTiles .....

[edit2] just took a look at the OxC code, it's not a ruleset flag but based on other configuration of the mission:

Code: [Select]
BattleUnit *BattlescapeGenerator::addXCOMUnit(BattleUnit *unit)
{
if (_baseInventory)
{
    // skirmish mode
}
else if (_craft == 0 || !_craftDeployed)
{
    // no craft, use XCOM spawnnodes
}
else if (_craft && !_craft->getRules()->getDeployment().empty())
{
    // has craft, has deployment rules, use MCD EntryPoints
}
else
{
    // fallback, also uses MCD EntryPoints
}
}

32
Is there a limit to the number of AI Route Nodes per map?

good question. Mv2 at present, i believe, limits the count to 256 ... but here are some notes for the next release:

Quote
- hardcap Link destinations to MaxDestId=250. The value is stored as a byte in
  the Routefile but the top 5 values are reserved for the compass points and the
  NotUsed value. Note that Routenode IDs are not limited to Byte.MaxValue but
  they can't be linked to if their ID is greater than 250.
- support more than 256 routenodes in a Routefile.

That is, the count of routenodes is basically unlimited (the maxsize of an RMP file on disk). But the link destination is stored in a byte ... so that needs to be limited.

but not sure how OxC/e handles this

33
I confirm; this information is coded in MCD files (terrain properties). There is no other way to check, you need to examine the files with MCDEdit (or some other program, if it exists).

McdView in Mapview2 package -- it's a standalone app or it can be opened from TileView (for quick inspection of MCD data, and it should work for quick edits also). backup yer data, I haven't tested it much ...

re. destruction of XCOM base facilities: unless an aLien is engaged in combat it paths to the closest routenode that has a nonzero BaseAttack value. From there it looks for content-tileparts that have the isBaseObject (#60 Xcom_Base) flag set true. If the aLien is equipped with a proper weapon (i saw non-HE in the OxC code) it attempts to shoot the object; if enough objects in a mapblock get destroyed, that XCOM Facility gets destroyed at the end of the base defense mission. And if such destruction isolates any other Facilities from the AccessLift and/or Hanger(s) they get destroyed also.


presumably if a Facility has no base-objects it can't be destroyed (haven't checked that though)

34
In university i thought about this a lot. In academic papers, if you're expressing someone else's original ideas or research, always reference it. But over time many ideas gradually enter the common parlance and then I'd reference where i learned them only until I was confident that i had "made them mine".

In much earlier days of the Internet I posted several of my poems to Usenet. One was plagiarized 3 times. One was satire, one was heavily inspired by, and one merely had some words changed. After getting over being stung to the quick for about a week, I came to Dioxine's conclusion: it's culture, get over it.


regardless,
Definitely give credit where credit is due. That's a part of culture as well,

35
Brutal AI / Re: [SOURCEMOD] Brutal-OXCE 5.0.4
« on: May 05, 2023, 01:38:44 am »
https://www.vg247.com/xcom-creator-gollop-voices-concern-over-paper-thin-illusion-of-weak-ai
Quote
Gollop also explained that while his AI in XCOM was emulating intelligence - due to a lack of power back then - there was still more believability due to the unpredictable nature of the game's alien enemies. Leaving some things to chance - rather than setting everything in stone - is the key, he said.

But as you said, it's not really what this is about and it already exists in the base-AI.

yep. And, as you say, the code is opensource. I don't imagine it would be *that* difficult to create a few random-branching patterns .....

36
Brutal AI / Re: [SOURCEMOD] Brutal-OXCE 5.0.4
« on: May 04, 2023, 09:09:55 pm »
heya, I'm not seriously suggesting this but just for the sake of understanding ...

when i was younger, playing XCOM, the ai would do stupid things (obviously). I'd have a soldier out in the open and an aLien would come around the corner and I'd go "oh crap. ded"

then the stupid thing would turn around and go away ... and id just freak out ... not because of the 'stupid ai decision' but because it made things seem like the aLiens had a more important agenda and I had no clue what it was. (confusion)

Chryssalids in aLien base missions were notorious; they'd clomp towards me, then stagger back, then maybe closer ... it was nervewracking (suspense)

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

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

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

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

    type: STR_EXAMPLE_UFO
    battlescapeTerrainData:
      mapDataSets:
      - 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)

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

Quote
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:
Spoiler:
Code: [Select]
Whirligig-1.MAP
Whirligig-1.RMP
Whirligig-2.MAP
Whirligig-2.RMP
Whirligig-3.MAP
Whirligig-3.RMP
Whirligig-4.MAP
Whirligig-4.RMP
Whirligig-5.MAP
Whirligig-5.RMP
Whirligig-6.MAP
Whirligig-6.RMP

Maybe. ( see my opinion above )

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

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

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

i have no idea where that map came from /shrug

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

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

42
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

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

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

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

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