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.


Topics - thusky

Pages: [1]
1
Hello,

Been a while since I last posted and worked on my mod, I'm back one year later and working on a script I worked on before. The idea of this script would be to skip the player's first turn only for certain mission, as such I'd like to be able to control this boolean (true/false) per mission.

I had a previously working prototype of the script which "Filip H" (discord) helped me make, however this version didn't allow me to control when I wanted this feature to be active, it was basically always active.

The old version:

Code: [Select]
# Script allowing Xcom: Rising from the deep to always skip first turn in battlescape and let the unit regain TU for the second turn.
extended:
  scripts:
    newTurnUnit:
      - offset: 21
        code: |
          var int isPlayerUnit;
          var int maxUnitTu;
          var int isEnemyTurn;

          unit.getFaction isPlayerUnit;
          unit.getTimeUnitsMax maxUnitTu;
          battle_game.getTurnSide isEnemyTurn;

          if eq turn 1;
            if eq isPlayerUnit 0;
            unit.setTimeUnits 0 ;
              if eq isEnemyTurn 1;
              unit.setTimeUnits maxUnitTu;
              end;
            end;
          end;
          return;

In the new version, I'm trying to add an item through the alienDeployments.rul with [ExtraRandomItems], however that wouldn't work on the long run, there surely is a better way to make a boolean to control the skip first turn per mission.

The new (WIP) version, which currently doesn't work:

Code: [Select]
#------DUMMY ITEM FOR BATTLETURN SKIP
items:
  - type: STR_TURN_SKIP
    categories: [STR_LOGIC]
    tags:
      SKIP_TAG: 1
# Script allowing Xcom: Rising from the deep to always skip first turn in battlescape and let the unit regain TU for the second turn.
extended:
  tags:
    BattleGame:
     SKIP_TAG: int

  scripts:
  #---Check if SKIP_TAG is present to skip first turn or not
    createItem:
      - offset: 21
        code: |
          var int isSkipTurn;

          item.getTag isSkipTurn Tag.SKIP_TAG;

          return;

  #---Skip First Turn
    newTurnUnit:
      - offset: 22
        code: |
          var int isPlayerUnit;
          var int maxUnitTu;
          var int isEnemyTurn;
          var int isSkipTurnPointer;
         
          unit.getFaction isPlayerUnit;
          unit.getTimeUnitsMax maxUnitTu;
          battle_game.getTurnSide isEnemyTurn;
          battle_game.getTag isSkipTurnPointer Tag.isSkipTurn;

          if eq isSkipTurnPointer 1;
            if eq turn 1;
              if eq isPlayerUnit 0;
              unit.setTimeUnits 0 ;
                if eq isEnemyTurn 1;
                unit.setTimeUnits maxUnitTu;
                end;
              end;
            end;
          end;
          return;

So all in all, a way to enable/disable skip first turn per mission.


EDIT:
Solution Down Below.

2
Abandon reason: the concept has flaws and needs more thought

Hey it's me again, while I'm on a roll I might as well ask about this!

While it's already achievable to remove every single item from the hire/sack/buy/sell menu, I was curious if it was possible, as a request, to prevent access to this menu altogether (like newBaseUnlockResearch) until a research unlocks this menu?

It could be useful for mods with a campaign where you start from nothing, if you want to make your player learn the ropes or be in a tight spot at the beginning, until they either research the necessary topic or complete a certain mission, it would give a lot more progression to the beginning of a campaign!

Again I'm eager to see you how you feel about or if it's needed at all, it's already achievable, just less "clean" than just straight up preventing access to the menu to begin with!

This feature could also be used to prevent access to the marketplace for certain bases, but that's another kind of request I assume!


EDIT:

Dropped the idea since feedback makes a good point that this feature would involve a lot of headaches from both modders and the players themselves!

3
Hey there!


I've been messaging Yankes and Meridian by PM and got recommended to make an official request here so everyone can estimate whether or not such feature would be nice for their mods (and thus be implemented, potentially).

I've been making a "Play as the aliens" mod for the past 3 weeks or so, as such I would like to force the player to only be able to have 1 alien race per craft, the feature would work like this:
Go to craft loadouts -> craft crew -> load 1 aquatoid soldier (now craft will only accept aquatoid units (soldiers/terror units)). -> Throw error message when trying to load a different race. -> Unload all  soldiers (empty craft) to accept other races again.

It is, in some way, similar to requiresBaseFunc but for crafts and would only trigger once a unit type is loaded (this could also be applied to armors for other mods).


Having soldier types limited per craft could be useful for mods restricting unit compositions, do tell me if I missed an additionnal benefit of such a feature though!

Do you guys think this would be an interesting enough feature to be added, could this be useful to you as a modder?



Cheers,
Nils

4
Help / Reaching out to old team members of UFO: TTS (The Two Sides)
« on: September 09, 2021, 02:11:17 pm »
Hey there!

I recently came back into TFTD and remembered how much fun I had with TTS, I figured why not, maybe with a little bit of luck I might be able to reach out old team members of the project!

I'm looking to adapt TTS to allow for TFTD mechanics and graphics altogether, considering I'd tweak them to avoid copyright issues, the usual you know (I'm a pixel artist by profession).

As such I was curious to know if the source code was still available somewhere, I saw a few posts here and there adressing the graphics (notably Xracer who seemed to have a connection with one of the artists).

If you happen to know Xracer or anyone who had a connection with the team, don't hesitate to answer here or to find me on the OpenXcom discord, I'd be more than eager to hear your story!

Cheers,

Nils

IMPORTANT EDIT:

I managed to reach out one of the former people working on the project. I decided it would be best to let that project rest! As such I'm going to take the long journey to adapt Open Xcom to have multiplayer geoscape/battlescape, it'll likely take years since I only have experience with C# and not C++ and still have no idea about open xcom code structure, wish me good luck,

See you space xcom cowboys!

Pages: [1]