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

Pages: [1] 2 3 ... 7
1
Help / Re: oxce ruleset docs?
« on: November 24, 2023, 12:54:51 am »
ok thnx

Is There a specific search word to find them in the verboise dump?

2
Help / Re: oxce ruleset docs?
« on: November 23, 2023, 10:40:04 pm »
can somebody point me to a list of hook functions?

3
Help / Re: Prevent Chryssalid Insta Kill
« on: November 23, 2023, 10:39:15 pm »
no, the default value is this:

Code: [Select]
const RuleItem *specialDamageTransform = attack.damage_item ? attack.damage_item->getRules() : nullptr;
int specialDamageTransformChance = 0;

if (specialDamageTransform
&& !specialDamageTransform->getZombieUnit(this).empty()
&& getArmor()->getZombiImmune() == false)
{
specialDamageTransformChance = getOriginalFaction() != FACTION_HOSTILE ? specialDamageTransform->getZombieUnitChance() : 0;
}

thanks again dude

4
Help / Re: Prevent Chryssalid Insta Kill
« on: November 23, 2023, 08:48:34 pm »
is  transform_chance always 100 if it isnt modded?

5
Help / Re: Prevent Chryssalid Insta Kill
« on: November 23, 2023, 09:55:29 am »
Sorry, but I tried your script and the logs clearly indicate what's wrong.

Code: [Select]
[23-11-2023_07-09-43] [ERROR] Invalid variable name 'transform'
[23-11-2023_07-09-43] [ERROR] Error in matching arguments for operator 'var'
[23-11-2023_07-09-43] [ERROR] Error in parsing script 'damageSpecialUnit' for 'Global Event Script': invalid operation in line: 'var int transform 0;'

It says exactly, which line is wrong ('var int transform 0;').
And it says exactly what's wrong (invalid variable name).

And Nord's answer is also correct.
Once you fix the issue with the variable name, the logs will complain about the missing return too.

Here's a fixed script:

Code: [Select]
extended:
  tags:                                                               
    BattleUnit:                           
      LRF_IS_DEAD: int                       
                   
  scripts:
    damageSpecialUnit:
      - offset: 99
        code: |
          var int temp 0;
          var int transformx 0; 
           
          set temp transform_chance;
          #...magic...
          set transform_chance temp;
          debug_log "transform " temp;  
          battle_game.flashLongMessage "STR_TRANSFORM_STRING";
          return;

my bad god i was looking for errors at end of the log,thinking that the script would error after the attack and it would be at bottom of the file

thanks once again Meridian

6
Help / Re: Prevent Chryssalid Insta Kill
« on: November 23, 2023, 01:53:35 am »
You should know it, you have all available tools to debug this, look in logs and see what was there.

its is bit problematic,as the debug doesnt spam anything i try,nothign fires

you forget
Code: [Select]
return; in the end.

tried that,no dice,thnx for trying

7
Help / Re: Prevent Chryssalid Insta Kill
« on: November 22, 2023, 04:10:41 am »
anybody know why that code fails?

8
Help / Re: Prevent Chryssalid Insta Kill
« on: November 19, 2023, 10:51:39 pm »
:) "...magic..." is not an operator, it is a joke.
Dont write it.

haha wasnt sure,tried this and debug line doesnt fire

Code: [Select]
extended:
  tags:                                                               
    BattleUnit:                           
      LRF_IS_DEAD: int                       
                   
  scripts:
    damageSpecialUnit:
      - offset: 99
        code: |
          var int temp 0;
          var int transform 0; 
           
          set temp transform_chance;
          #...magic...
          set transform_chance temp;
          debug_log "transform " temp;  
          battle_game.flashLongMessage "STR_TRANSFORM_STRING";

9
Help / Re: Prevent Chryssalid Insta Kill
« on: November 19, 2023, 11:00:20 am »
first string is wrong, and you forget about @magic@ in a middle.
If you want make chances equal to 0:
Code: [Select]
set transform_chance 0;If you want set chances 15% less:
Code: [Select]
set temp transform_chance;
muldiv temp 85 100;
set transform_chance temp;
And dont forget to define variable in a beginning of script:
Code: [Select]
    damageSpecialUnit:
      - offset: 11    # any number for counting
        code: |
          var int temp;

ok thnx for reply,i tried a few variasions of this

Code: [Select]
  scripts:
    damageSpecialUnit:
      - offset: 99
        code: |
          var int temp 0;
          var int transform 0; 
           
          set temp transform_chance;
          ...magic...
          set transform_chance temp;
          debug_log "transform " temp;  
          battle_game.flashLongMessage "STR_TRANSFORM_STRING";

they break the code,and the string dosnt fire

10
Help / Re: Prevent Chryssalid Insta Kill
« on: November 18, 2023, 10:31:05 am »
Youmust Show it here.

my script i tried these :

Code: [Select]
          #get transform_chance temp;
          #set transform_chance temp;
          #set temp transform_chance;  
          #debug_log "transform " temp;

it is a script to cheat death,originaly copied from Meridian lucky script i found on this forum,this doesnt fire if i uncoment those(one at a time of course)

Code: [Select]
          unit.getHealth Health;                 # get current health
          sub Health to_health;                  # sub projected hp loss from current hp
          debug_log "Unconscious Code Health:" Health;     
         
          unit.getStun stunLevel;                # set var to unit stun level
          add stunLevel to_stun;                 # add projected stun level to current stun level
          debug_log "Unconscious Code Stun:" stunLevel;       
         
          #get transform_chance temp;
          #set transform_chance temp;
          #set temp transform_chance;  
          #debug_log "transform " temp;         
          if ge stunLevel Health;
             #battle_game.flashLongMessage "STR_TRANSFORM_STRING";
             battle_game.flashLongMessage "STR_UNCONSCIOUS_STRING";
             #set transform_chance temp;
             #debug_log "transform " temp";         
             unit.getHealthMax temp;
             unit.setHealth temp;
             mul temp 4;
             unit.setStun temp;
             set to_health 0;
             set to_stun 0;
             set to_wound -50;
             unit.disableIndicators;
             unit.setTag Tag.LRF_IS_DEAD 1;
             return;
          end;

11
Released Mods / Re: xcom1 and xcom2 mod?
« on: November 17, 2023, 10:19:46 pm »
You want ufo shot down by interceptors underwater crash sites? or random monthly generated ufo crash sites? (Similar to terror missions)

Crash Site

12
OXCE Suggestions Archive / Re: new script functions
« on: November 17, 2023, 10:07:26 pm »
That's one of the worst feature descriptions I've seen in a long time.

Do you really expect I can do anything based on such vague and incomplete "bunch of words".
These don't even qualify as full sentences.

Please don't insult us like this.

O.o sorry it bugged,wasnt trying to insult anybody,

whats wrong with spawn item and delete item?

13
delete map items and create map items

edit: typo

14
Help / Re: Prevent Chryssalid Insta Kill
« on: November 17, 2023, 08:47:04 am »
To create full list of script commands, you need to switch "verboseLogging" in options.cfg to "true", then launch oxce, then quit and open file "openxcom.log". It will contain not only log, but script help. Save it somewhere, and remember to update when upgrade to newer OXCE version.
Just as any variable,
Code: [Select]
set temp transform_chance;
...magic...
set transform_chance temp;

Like 0 is no transform at all, 100 - transform by any circumstances.

I Tried both of those,they both break the script

thnx tho for trying

15
Help / Re: create item / delete item
« on: November 17, 2023, 08:46:03 am »
1. modify amounts of elerium: use
Code: [Select]
alienFuel: [STR_ANYTHING_YOU_WANT, 10], where 10 is as much fuel will be placed in each alien power source.
2. modify amounts of alloys, cloning, etc: look here
3. modify type of special items on map - you need to modify terrain via special program, like MCDEdit. Look in the "Tools" subforum

edit maps,bit it thnx again

Pages: [1] 2 3 ... 7