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

Pages: 1 ... 4 5 [6] 7
76
1. That's not the case. In the current implementation you can switch between the traditional names (+statstring) and the callsign display by right clicking the stats in the battlescape.

2. The reason is character depth and preservation of information. The same reason we have soldier diaries. I find it way more entertaining to have my soldier "Bernd Becker" assigned the callsign "Bombe" at random than having only the nickname. It also opens up other possibilities for modders, like giving away callsigns at specific ranks.

Gesendet von meinem Pixel 2 mit Tapatalk

77
I would just like to have the option to display that nickname in the battlescape instead of the real name + statstring.

Also having them randomly generated alongside a real name gives additional depth to the soldiers. I like to have my german soldier "Bernd Becker" to have the random callsign "Bombe" for example. I think there is some genuine fun to have the game assign these monikers randomly but controlled by modders.

Of course the change would be completely optional and I do not plan adding invasive UI changes at the moment. Also the current plan for displaying it is just the callsign (only in the battlescape), if defined. And the name + statstring else.

I feel like the current combination of Rank + First Name + Last Name + Statstring can already be quite long..

78
Hi folks,

I'd like to have an additional callsign for my soldiers. So that in addition to the name "John Smith" the game would generate a nickname like "Snake" or "Bombshell" for my soldiers. The callsigns could be modded exactly like names currently can: By nationality and gender.

Callsigns would be assigned at random on soldier generation and the current plan is to only display them in the BattleScape if they are defined. Reverting to default behaviour if not.

I am looking for people who support this idea and if there are enough I would go and implement it.

So: Opinions, please  ;D

79
OXCE Support / Re: New feature: Replacement for Psionics
« on: January 20, 2020, 05:08:52 pm »
If done in a generalized way and integrating with the ModScripts & RuleSets? Sure.

You might want to talk to Meridian and Yankes though, before doing any major work on the OXCE code base.

80
OXCE Support / Re: New feature: Replacement for Psionics
« on: January 20, 2020, 04:48:06 pm »
Hmm Yankes & Meridian will know in detail but my guess would be the following things would require code changes and could not be done via ModScript today:

 - Force a unit to fire
 - Force explosions (at position, of items)
    - With the exception of grenades which already exist in the BattleScape, which can be detonated by manipulating the fuse (via Script).
 - Open a door without the player opening it manually
 - Check the complete inventory for an item (AFAIK we can only check left and right hand, right now)

81
OXCE Support / Re: New feature: Replacement for Psionics
« on: January 20, 2020, 04:16:52 pm »
I've actually toyed around with a similar idea while implementing the EU2012 skills.

Some of the things you describe (set ammo count to 0, check for weapon in hand, check for unit type, apply stun damage) can already be done via ModScripts.

Most of the other things you describe would require changes to the codebase. When it comes to changing the source code, I am most of the time in favour of not implementing a specific feature, but enabling modders to implement such a feature by creating the needed parts.

82
OXCE Suggestions Abandoned / Re: [Abandonned][Feedback] Fatigue?
« on: January 19, 2020, 02:50:34 am »
Just had a thought: What about using the tag system which Yankes implemented for the scripts for this feature? And extending and generalizing the ruleset additions to make them handle tags? Could be very powerful ;D

83
OXCE Support Y-scripts / Re: More ModScript examples
« on: January 16, 2020, 11:12:15 pm »
Here I will post some scripts I use to fine-tune the game experience to my liking
1. Alien Exposer
This one negates the vision advantage of the aliens and makes XCOM units see as good as them.
2. Accuracy Nerfer (Adjuster ;)
Allows global changes to the accuracy of all alien units. I use this if I think the aliens are aiming a bit too good  ;D Of course it can be used to make the Game even harder by just globally increasing the accuracy of your foes.
3. Power Nerfer
Same as the above. Allows global attack power adjustment of the enemies. Could also be used to make them hit harder..
4. Critical hits. Code for simple critical hits. Might still be a bit finicky. I use this because I play with with a very low damageRange.

Code: [Select]
extended:
  tags:
    BattleUnit:
      CRITICAL_STATE: int
    RuleItem:
      CRIT_CHANCE: int
      CRIT_DAMAGE: int
  scripts:
    visibilityUnit:
      - offset: -1 # alien exposer
        code: |
          var ptr RuleArmor armor_rule;
          var ptr RuleSoldier soldier_rule;
         
          observer_unit.getRuleSoldier soldier_rule; 

          if neq soldier_rule null;  # we have an xcom unit as observer
            if le distance distance_max;
              set current_visibility 100; # expose enemy unit if in max viewing dist (like the aliens..)
            end;
          end;
          return current_visibility visibility_mode;
    createUnit:
      - offset: -1 # accuracy nerfer
        code: |
          var ptr RuleSoldier soldier_rule;
          var int id;
          var int firing;
          var int adjustment;
         
          set adjustment 90; # 90% accuracy

          unit.getId id;
          unit.getRuleSoldier soldier_rule; 

          if eq soldier_rule null;  # we have an alien unit
            debug_log "Adjusting accuracy of unit" id;
            unit.Stats.getFiring firing;
            debug_log " - from" firing;
            muldiv firing adjustment 100;
            unit.Stats.setFiring firing;
            debug_log " - to" firing;
          end;
          return;
    hitUnit:
      - offset: -1 # power nerfer
        code: |
          var ptr RuleSoldier soldier_rule;
          var int id;
          var int firing;
          var int adjustment;
         
          set adjustment 70; # 70% power

          unit.getId id;
          unit.getRuleSoldier soldier_rule; 

          if neq soldier_rule null;  # we have an xcom unit
            debug_log "Adjusting power of hit against xcom unit" id;
            debug_log " - from" power;
            muldiv power adjustment 100;
            debug_log " - to" power;
          end;
          return power part side;
    damageUnit:
      - offset: -1 # critical hits (balancing for lower damageRange)
        code: |
          var ptr RuleItem item_rule;
          var int weapon_chance;
          var int unit_chance;
          var int chance;
          var int crit_factor;  # 100 = 100% additional damage of original power
          var int crit_damage;

          weapon_item.getRuleItem item_rule;

          unit.getTag unit_chance Tag.CRITICAL_STATE;
          item_rule.getTag weapon_chance Tag.CRIT_CHANCE;
          item_rule.getTag crit_factor Tag.CRIT_DAMAGE;

          add unit_chance weapon_chance;

          if eq unit_chance 0;
            set unit_chance 5;  # base chance of 5% for everybody
          end;

          if eq crit_factor 0;
            set crit_factor 20; # 20% additional damage as baseline for everybody on crit
          end;

          battle_game.randomChance unit_chance; # will set unit_chance to 1 on success
          if gt unit_chance 0;
            set crit_damage orig_power;
            muldiv crit_damage crit_factor 100;
            add to_health crit_damage;
            debug_log "CRITICAL HIT:" crit_damage;
          end;
          return;

84
OXCE Support Y-scripts / Re: More ModScript examples
« on: January 16, 2020, 11:04:11 pm »
So, I guess this is the right place to continue posting about my various modscripting examples that fit nowhere else. Let's start off with a XCOM2 style mimic beacon:

Code: [Select]
items:
  - type: STR_MIMIC_BEACON
    size: 0.1
    costBuy: 10000 # cannot buy
    costSell: 8000
    weight: 3
    bigSprite: 55
    floorSprite: 72
    power: 0
    damageType: 0
    damageAlter:
      FixRadius: 0
    battleType: 4
    accuracyThrow: 100
    costPrime:
      time: 45
    costUnprime:
      time: 5
    costThrow:
      time: 5
    primeActionName: STR_MIMIC_PRIME_ACTION
    primeActionMessage: STR_MIMIC_PRIME_MESSAGE
    unprimeActionName: STR_MIMIC_UNPRIME_ACTION
    unprimeActionMessage: STR_MIMIC_UNPRIME_MESSAGE
    recover: true
    spawnUnit: STR_SOLDIER_MIMIC # Default empty meaning don't spawn a unit, when a valid unit (defined in the units: ruleset) is defined here it will be spawned by this item.
    spawnUnitFaction: 2 # Default -1 meaning the spawned unit will be the same faction as the unit using/firing the item, this defines which faction gets the new unit:
                         #   -1: Same faction as item user
                         #    0: Player faction
                         #    1: Enemy faction
                         #    2: Civilian faction

units:
  - type: STR_SOLDIER_MIMIC
    race: STR_SOLDIER_MIMIC
    stats:
      tu: 0
      stamina: 0
      health: 45
      bravery: 110
      reactions: 0
      firing: 0
      throwing: 0
      strength: 0
      psiStrength: 100
      psiSkill: 0
      melee: 0
    armor: MIMIC_ARMOR
    standHeight: 16
    kneelHeight: 16
    value: 0
    deathSound: 23
    moveSound: 14
    energyRecovery: 50
    aggression: 0
    capturable: false
    moraleLossWhenKilled: 0
   

extended:
  tags:
    BattleUnit:
      MIMIC_COUNTER: int
    RuleArmor:
      IS_MIMIC: int

armors:
  - type: MIMIC_ARMOR
    tags:
      IS_MIMIC: 1
    units: [STR_SOLDIER_MIMIC]
    corpseBattle:
      - STR_CORPSE
    allowsMoving: false
    createsMeleeThreat: false
    spriteSheet: XCOM_0.PCK
    spriteInv: MAN_0
    spriteFaceGroup: 6
    spriteFaceColor: [96, 96, 96, 96, 160, 160, 163, 163] #M0 F0 M1 F1 M2 F2 M3 F3
    spriteHairGroup: 9
    spriteHairColor: [144, 144, 164, 164, 245, 245, 166, 166] #M0 F0 M1 F1 M2 F2 M3 F3
    storeItem: STR_NONE
    frontArmor: 12
    sideArmor: 12
    rearArmor: 12
    underArmor: 12
    damageModifier:
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
      - 1.0
    loftempsSet: [ 3 ]
    scripts:
      createUnit: |
        var ptr RuleArmor armor_rule;
        var int is_mimic;
        debug_log "Mimic Beacon Code running";
        unit.getRuleArmor armor_rule; 
        armor_rule.getTag is_mimic Tag.IS_MIMIC;

        if gt is_mimic 0;  # we have a mimic
          debug_log "Mimic Beacon Spawned";
          unit.setTag Tag.MIMIC_COUNTER 2;
        end;
        return;
      recolorUnitSprite: |
        var int color;
        var int temp;
        get_color color new_pixel;
       
        set temp anim_frame;
        wavegen_tri temp 16 16 15;
        mul temp -1;
        add temp 8;
        add_shade new_pixel temp;

        return new_pixel;
      newTurnUnit: |
        var ptr RuleArmor armor_rule;
        var int counter;
        var int is_mimic;

        debug_log "Mimic Beacon Code On New Turn";
        if eq side 1; # on the alien turns
          unit.getRuleArmor armor_rule; 
          armor_rule.getTag is_mimic Tag.IS_MIMIC;

          if gt is_mimic 0;  # we have a mimic
            unit.getTag counter Tag.MIMIC_COUNTER;

            sub counter 1;
            debug_log "Mimic Counter: " counter;

            if gt counter 0;
              unit.setTag Tag.MIMIC_COUNTER counter;
            end;
            if eq counter 0; # mimic beacon timer is over
              unit.setHealth 0;      # kill the mimic
              debug_log "Mimic removed";
            end;
          end;
        end;
        return;

extraStrings:
  - type: en-US
    strings:
      STR_MIMIC_BEACON: Mimic Beacon
      STR_MIMIC_ARMOR: Mimic Armor
      STR_SOLDIER_MIMIC: Deployed Mimic Beacon
      STR_MIMIC_PRIME_ACTION: Activate Beacon
      STR_MIMIC_PRIME_MESSAGE: Mimic Beacon activated
      STR_MIMIC_UNPRIME_ACTION: Deactivate Beacon
      STR_MIMIC_UNPRIME_MESSAGE: Mimic Beacon deactivated

85
OXCE Suggestions Abandoned / Re: [Feedback] Fatigue?
« on: January 16, 2020, 12:08:23 pm »
"Once the fatigue-meter hits 100%, the soldier doesn't want to go to a mission for a certain amount of Fatigue Days."

Take this for example: You cannot do that with the current implementation of the mana resource, afaik. Eg. If that mana resource is at 100% disallow embarking on missions.

It would need special code to handle that. I would propose not adding that code only for fatigue, but as a generalized moddable hook.

Gesendet von meinem Pixel 2 mit Tapatalk


86
OXCE Suggestions Abandoned / Re: [Feedback] Fatigue?
« on: January 16, 2020, 12:00:22 pm »
That depends, if everything people would want with resources is already possible with mana, then there is no difference and the problem seems solved. But since the fatigue resource has been brought up it might mean not everything that is wanted for fatigue is possible with mana?

Gesendet von meinem Pixel 2 mit Tapatalk


87
OXCE Suggestions Abandoned / Re: [Feedback] Fatigue?
« on: January 15, 2020, 05:51:26 pm »
What about taking the one slot we have (currently mana) and make it completely configurable. So it could be mana, fatigue or whatever. Down to the hooks where the values would have to change.

That would not allow having mana+fatigue, of course. But I see no other way except redoing UI or having hidden stats.

Gesendet von meinem Pixel 2 mit Tapatalk


88
OXCE Suggestions Abandoned / Re: [Feedback] Fatigue?
« on: January 15, 2020, 05:44:36 pm »
Hmm, semantics of fatigue/stamina/energy are identical enough to be confusing when existing at the same time. This seems to be another custom resource, like mana. One could foresee more requests of this type in the future. So maybe a generalized system for adding such resources and hooks for manipulation? Already people like myself use mana for things like battle focus. We could also open up to the idea of having configurable stats. Just my 2 cents.

Gesendet von meinem Pixel 2 mit Tapatalk


89
OXCE Support Y-scripts / Re: Custom scripting reference or help?
« on: January 08, 2020, 08:35:35 am »
That is correct.
You also have le (less than or equal) ge (greater than or equal) and neq (not equal).

Gesendet von meinem Pixel 2 mit Tapatalk


90
OXCE Support Y-scripts / Re: Custom scripting reference or help?
« on: January 07, 2020, 10:58:54 pm »
AFAIK, loops are not added yet. The return statement is for returning control back to the game. Basically exiting your current script.

Pages: 1 ... 4 5 [6] 7