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 ... 32
1
Tools / Re: MAPVIEW upgrade
« on: March 02, 2024, 11:13:36 pm »
Thanks, you too.

ps. good luck with the other one (i cant make heads or tails of it)

if u really can't access options, the config files can be edited ... I suspect that the problem is not with Options per se, but with instantiating the propertypanel for user input

2
Tools / Re: MAPVIEW upgrade
« on: March 02, 2024, 01:08:22 pm »
And ...  ;D ... it also crashes when I use the mouse wheel.

Code: [Select]
Unhandled Exception:
System.EntryPointNotFoundException: WindowFromPoint assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) MapView.MainViewF.WindowFromPoint(System.Drawing.Point)
  at MapView.MainViewF.PreFilterMessage (System.Windows.Forms.Message& m) [0x00020] in <0a0656103b894489b35d71dc5339306a>:0
  at System.Windows.Forms.Application.FilterMessage (System.Windows.Forms.Message& message) [0x0001f] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x000e9] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00011] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00006] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at MapView.Start.Start_init () [0x00021] in <0a0656103b894489b35d71dc5339306a>:0
  at MapView.Program.Main (System.String[] args) [0x00033] in <0a0656103b894489b35d71dc5339306a>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: WindowFromPoint assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) MapView.MainViewF.WindowFromPoint(System.Drawing.Point)
  at MapView.MainViewF.PreFilterMessage (System.Windows.Forms.Message& m) [0x00020] in <0a0656103b894489b35d71dc5339306a>:0
  at System.Windows.Forms.Application.FilterMessage (System.Windows.Forms.Message& message) [0x0001f] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.RunLoop (System.Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x000e9] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00011] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00006] in <b2f5ba339bd244a2a072fe9fd5539e2f>:0
  at MapView.Start.Start_init () [0x00021] in <0a0656103b894489b35d71dc5339306a>:0
  at MapView.Program.Main (System.String[] args) [0x00033] in <0a0656103b894489b35d71dc5339306a>:0

The mousewheel issue likely has to do with Forms/MainView/MainViewF (near the top). I don't have Mono and I'm not absolutely positive about the __MonoCS__ flag. This bit of code (and associated stuff perhaps) allows windows to capture the mousewheel even if a control is not currently focused. Did you build against mono yourself, because if you're relying on a build against .NET well ... this is the kind of stuff that would throw ... or so it seems to me

Code: [Select]
#if !__MonoCS__
#region P/Invoke declarations
[DllImport("user32.dll")]
static extern IntPtr WindowFromPoint(Point pt);

[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
#endregion P/Invoke declarations

#region IMessageFilter
/// <summary>
/// Sends mousewheel messages to the control that the mouse-cursor is
/// hovering over.
/// </summary>
/// <param name="m">the message</param>
/// <returns>true if a mousewheel message was handled successfully</returns>
/// <remarks>https://stackoverflow.com/questions/4769854/windows-forms-capturing-mousewheel#4769961</remarks>
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == 0x20a)
{
// WM_MOUSEWHEEL - find the control at screen position m.LParam
var pos = new Point(m.LParam.ToInt32());

IntPtr hWnd = WindowFromPoint(pos);
if (hWnd != IntPtr.Zero && hWnd != m.HWnd && Control.FromHandle(hWnd) != null)
{
SendMessage(hWnd, m.Msg, m.WParam, m.LParam);
return true;
}
}
return false;
}
#endregion IMessageFilter
#endif

3
Tools / Re: MAPVIEW upgrade
« on: March 02, 2024, 12:56:18 pm »
sorry i don't warantee Mono, but if you find a solution ...

4
Tools / Re: MAPVIEW upgrade
« on: January 26, 2024, 04:05:59 pm »
luuuuuuuuke !

5
Tools / Re: MAPVIEW upgrade
« on: January 17, 2024, 10:09:50 am »
I request an option for directly reading a OXC(E) terrain .rul file in MapView.
Instead of having to use the RulesetConverter initally and re-convert whenever something in the .rul file changes.

hiya, good idea,

unfortunately my flagging health is putting me behind on a bunch of stuff (already) ...

imo, Mapview should get a means of loading (user choice) "MapTilesets" -- if that were done, it'd be a good time to also put in loading a Terrain.rul file. One thing that strikes me right away is disabling a bunch of maptree stuff (so a maptree that's based on a .rul file can't be changed, as you note).

automagically changing the Mapview (global) Basepath is also something to consider (though this can already be done with the Configurator it would be a nice feature, which however necessitates a mechanism to automagically change it back ...) etc.


Personally im glad that Mv2 seems to be stable in its current state, but (for me) this would be a fairly big new feature to implement,

6
Tools / Re: Changed PC and now my maps are broken
« on: December 04, 2023, 08:39:02 pm »
if you have custom maps its gonna be hard without the old config file

I can say that if you had the maps/terrains set up in OXC/e then that has its own config files (which list terrain-order) -- Solarius et al knows more about this than i do.*

or if all u want is the stock maps configured, Mapview2 can generate a new MapTilesets.yml (but that won't recreate any custom stuff)


* oh, if you have the maps set up in a Terrains.rul file, I think Mv2 can pull that data out to create yaml for MapTilesets ... see RulesetConverter.txt and .exe

7
Tools / Re: Changed PC and now my maps are broken
« on: November 29, 2023, 10:26:09 pm »
u need the MapTilesets.yml file from the /settings folder of your old Mapview2 installation

8
Tools / Re: MAPVIEW upgrade
« on: June 03, 2023, 01:13:08 am »
Thank you for updating MapView2 your program is great.

i pass it on in spirit to Ben, and anyone who's contributed in any way: code, reports, requests

/salut

9
Help / Re: Not spawning the expected units inside the UFO?
« on: June 02, 2023, 02:50:28 pm »
I honestly don't know what the rationale is/was ... but that's the only thing i can think of (ie. it's not a bug per se)

10
Help / Re: Not spawning the expected units inside the UFO?
« on: June 02, 2023, 12:42:01 am »
yeh so i did another test with noderanks 2..5 (Soldier through Medic) (civ/scout nodes appear to be ignored for this)

the Hallucinoid terrorist spawned at Soldier node, and if no Soldier node is present then at Medic node, then Squad Leader node, then at Navigator/Commander node ...

ignoring the Terrorist2 spawnnode until all the others were set to civ/scout ...

[edit]
it looks like these lines in the hardcode are responsible:

Savegame/Node.cpp
Code: [Select]
const int Node::nodeRank[8][7] =
    // ..
    { 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

ie. terrorists spawn at Soldier nodes preferentially ... (note that those constants are based on UFO but translate to TFTD ranks, with (ufo)Engineer as (tftd)Medic, etc)

[edit2]
here's the (rewritten) table in my personal build:

Code: [Select]
const int Node::nodeRank[8u][8u]
{
    { NR_LEADER,    NR_NAVIGATOR, NR_ENGINEER,  NR_SOLDIER,  NR_MEDIC,     NR_MISC2,  NR_MISC1, NR_SCOUT }, // commander
    { NR_LEADER,    NR_NAVIGATOR, NR_ENGINEER,  NR_SOLDIER,  NR_MEDIC,     NR_MISC2,  NR_MISC1, NR_SCOUT }, // leader
    { NR_ENGINEER,  NR_LEADER,    NR_NAVIGATOR, NR_SOLDIER,  NR_MEDIC,     NR_MISC2,  NR_MISC1, NR_SCOUT }, // engineer
    { NR_MEDIC,     NR_NAVIGATOR, NR_ENGINEER,  NR_LEADER,   NR_SOLDIER,   NR_MISC2,  NR_MISC1, NR_SCOUT }, // medic
    { NR_NAVIGATOR, NR_LEADER,    NR_ENGINEER,  NR_SOLDIER,  NR_MEDIC,     NR_MISC2,  NR_MISC1, NR_SCOUT }, // navigator
    { NR_SOLDIER,   NR_ENGINEER,  NR_NAVIGATOR, NR_MEDIC,    NR_LEADER,    NR_MISC2,  NR_MISC1, NR_SCOUT }, // soldier
    { NR_MISC1,     NR_MISC2,     NR_SOLDIER,   NR_ENGINEER, NR_NAVIGATOR, NR_LEADER, NR_MEDIC, NR_SCOUT }, // terrorist1
    { NR_MISC2,     NR_MISC1,     NR_SOLDIER,   NR_ENGINEER, NR_NAVIGATOR, NR_LEADER, NR_MEDIC, NR_SCOUT }  // terrorist2
};

but it has 8 ranks in the 2nd dimension .....

11
Help / Re: Not spawning the expected units inside the UFO?
« on: June 01, 2023, 09:04:29 am »
so i set up a little spawntest and ran it against OxCe, and a Hallucinoid spawned at the correct node

Code: [Select]
alienRaces:
  - id: STR_AQUATOID_UNDERWATER
    members:
      - STR_AQUATOID_COMMANDER
      - STR_AQUATOID_NAVIGATOR
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_SOLDIER
      - STR_HALLUCINOID_TERRORIST
      - STR_HALLUCINOID_TERRORIST

Code: [Select]
alienDeployments:
  - type: STR_SPAWNTEST
    width: 20
    length: 20
    height: 4
    terrains:
      - SPAWNTEST
    data:
      - alienRank: 7
        lowQty: 1
        highQty: 1
        dQty: 0
        pctOutsideUfo: 100
        itemSets:
          -
            []
          -
            []
          -
            []

Code: [Select]
terrains:
  - name: SPAWNTEST
    music:
      - GMTACWET
    mapDataSets:
      - BLANKS
      - SAND
      - ROCKS
      - WEEDS
      - DEBRIS
      - UFOBITS
    depth: [1, 2]
    ambience: 67
    script: THREEBIG
    mapBlocks:
      - name: SEABED00
        width: 10
        length: 10
        groups: 1
      - name: SEABED01
        width: 10
        length: 10
        groups: 1
      - name: SEABED02
        width: 10
        length: 10

I modified SEABED02.RMP (see screenshot) with 4 civ/scout nodes in the corners and a Terrorist2 node in the middle (all spawnweights=1)

12
Help / Re: Not spawning the expected units inside the UFO?
« on: May 30, 2023, 09:40:19 am »
Is there a difference in the way TFTD handles its terror unit ranks in the .RMP file vs the original X-COM: UFO Defense?

no i don't believe so. Am pretty sure the format of the RMP file is the same for both UFO and TFTD.

OxC/e hardcode matches up the data in alienDeployments.rul with appropriate noderanks in the RMP files (per the order of the ranks listed in alienRaces.rul).


I mucked and poked and tested and thought a bunch on this "force alienrank at node" issue today. But unfortunately I don't have OxC or OxCe setup in an IDE so my investigations were hampered ...

I did see and note some things that could be done a bit better (imo) -- for example, the game crashed arbitrarily (about 50%) when trying to do a quickbattle with only 1 terrorist spawning ('could not place any alien units on the map'), and that only the highest spawnpriority seems to be chosen (i could be wrong, depends on things I didn't look at completely) but lesser priority-values of the same rank are ignored (ie. rather than weighted). etc

perhaps somebody with the code already setup, and a curiosity about this stuff (again, merely my perception here) can or is interested in a more detailed look ...

13
Help / Re: Not spawning the expected units inside the UFO?
« on: May 27, 2023, 08:40:41 am »
(i don't do TftD really, but) maybe the non-terrorist spawns are happening before the terrorist spawns and are taking those nodes.

as a test, try removing all spawns from the deployment except the terrorists, and see what happens

set their lowQty and highQty to 2 (for each terrorist-type) and dQty to 0

14
Tools / Re: MAPVIEW upgrade
« on: May 23, 2023, 01:38:07 am »
2023 May 22

MapView.exe 4.4.6.0
McdView.exe 4.1.2.1
PckView.exe 4.3.0.1
XCom.dll 4.2.0.0
DSShared.dll 4.2.1.1
YamlDotNet.dll 0.0.1.0 (c) Antoine Aubry and contributors

ConfigConverter.exe 2.2.2.1
RulesetConverter.exe 1.3.0.1

RouteView

    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.

    TftD NodeRanks: change "Leader/Commander" string to "Navigator/Commander".

    SpawnInfo dialog: rework layout mechanics to account for the longer
    "Navigator/Commander" string.

    add (textbox) Goto #id on the menubar.

    rewrite the embedded MonotoneSpriteset (TopView's quadrant and TileView's
    eraser sprites).

MapResize

    restrict cols/rows/levels to Max 255 (these values are stored in a Mapfile as
    bytes).

    bugfix: when removing levels from the bottom of a Map that has routenodes that
    go out of bounds at the currently displayed level an exception was thrown by
    RouteView's Paint routine. fixed ...


https://github.com/kevL/OpenXCOM.Tools/releases/tag/230522

15
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
}
}

Pages: [1] 2 3 ... 32