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

Pages: [1] 2 3 ... 159
2
OpenXcom Extended / Re: Mods to work for OpenXCOM Extended
« on: February 24, 2021, 11:35:24 am »
Only caveat is that OXCE is more restrictive if mod have bugged data

3
OpenXcom Extended / Re: [Documentation][y-script] OXCE Script examples
« on: February 21, 2021, 06:07:47 pm »
Iterate whole inventory of unit and special weapons (like buildin alien PSI attack)
Code: [Select]
          begin;
            var int size;
            unit.getInventoryItem.size size;
            loop var i size;
              var ptre BattleItem item;
              unit.getInventoryItem item i;
             
              debug_log "unit" unit "have in inv" item;
            end;
          end;
         
          begin;
            var int size;
            unit.getSpecialItem.size size;
            loop var i size;
              var ptre BattleItem item;
              unit.getSpecialItem item i;
             
              debug_log "unit" unit "have in spec" item;
            end;
          end;

result:

Code: [Select]
[21-02-2021_17-04-09] [DEBUG] Script debug log: unit BattleUnit(type: "STR_ETHEREAL_SOLDIER" race: "STR_ETHEREAL" id: 1000017 faction: Hostile hp: 1/100) have in inv BattleItem(name: "STR_HEAVY_PLASMA" id: 117)
[21-02-2021_17-04-09] [DEBUG] Script debug log: unit BattleUnit(type: "STR_ETHEREAL_SOLDIER" race: "STR_ETHEREAL" id: 1000017 faction: Hostile hp: 1/100) have in inv BattleItem(name: "STR_ALIEN_GRENADE" id: 119)
[21-02-2021_17-04-09] [DEBUG] Script debug log: unit BattleUnit(type: "STR_ETHEREAL_SOLDIER" race: "STR_ETHEREAL" id: 1000017 faction: Hostile hp: 1/100) have in inv BattleItem(name: "STR_HEAVY_PLASMA_CLIP" id: 120 ammo: 35/35)
[21-02-2021_17-04-09] [DEBUG] Script debug log: unit BattleUnit(type: "STR_ETHEREAL_SOLDIER" race: "STR_ETHEREAL" id: 1000017 faction: Hostile hp: 1/100) have in spec BattleItem(name: "ALIEN_PSI_WEAPON" id: 116)

4
OpenXcom Extended / Re: [Documentation][y-script] OXCE Script examples
« on: February 19, 2021, 09:15:08 pm »
Code what find all units that are 2 tile way from `unit`
Code: [Select]

          begin;
            var int range 2;
            var int l 0;
            var int rangeVoxel;
            var int sx;
            var int sy;
            var int sz;
            var ptr Tile st;
           
            unit.getPosition.getX sx;
            unit.getPosition.getY sy;
            unit.getPosition.getZ sz;
            battle_game.getTile st sx sy sz;
           
            set l range;
            mul l 2;
            add l 1;
           
            set rangeVoxel range;
            mul rangeVoxel 16;
            add rangeVoxel 8; #half tile buffer for max distance
           
            loop var x l;
              add x sx;
              sub x range;
             
              loop var y l;
                add y sy;
                sub y range;
               
                loop var z l;
                  add z sz;
                  sub z range;
                 
                  begin;
                    var ptr Tile t;
                    var int tileDistance;
                    var ptr BattleUnit bu;
                   
                    battle_game.getTile t x y z;
                    t.getUnit bu;
                    st.getDistanceVoxel tileDistance t;
                    if and neq bu null gt tileDistance 0 lt tileDistance rangeVoxel;
                     
                      #check other close units
                      debug_log "unit" bu "at" t;
                    end;
                  end;
                end;
              end;
            end;
           
          end;

5
IDT Modding Hub / Re: [UFO MEGAMOD] Reaver's Faithful Megamod
« on: February 13, 2021, 12:02:06 am »
This look like not enough reserved space by mod for its resources in common collections.
Try add `reservedSpace: 2` to mod `metadata.yml`

6
40k / Re: 40k
« on: February 12, 2021, 03:21:56 pm »
Now another question, probably not a bug but something i can't figure out : in my base when i want to build facilities, only half of them can be selected, the bottom half (trade outpost, training facillity, clear terrain, etc...) are present but clicking on them does nothing, they just can't be selected, why is that ? 
 
Facilitates visible but not clickable mean that your base do not have required buildings to built this new one. Alterative some buildings could exclude others.

7
OpenXcom Extended / Re: OXCE (OpenXcom Extended) main thread
« on: February 11, 2021, 06:07:11 pm »
New functionality in scripts:

Code: [Select]
          begin; #stat new scope with new variables
            var int i 15; #new variable in the middle of script

            loop var zz i; #repeat this code block `i` times, `zz` will have values from `0` to `i-1`
              if eq zz 6;
                break; #break out of loop block
              end;
              if eq zz 3;
                continue; #skip rest of body of loop and repeat it from start with next `zz` value.
              end;
            end;
          end;

I added too new function to multiple function in script for unit stats, idea is that in may cases you want add some value to some stat and you are not interested in current value, now you need use `getX` and `setX` to set some thing, now I added `addX` that add to value of stat.

8
I think only place that could be transparent is corners. max 1 or 3 pixels on each corner. This will be probably very hard to "target" by human.

On other hand, should only center part of robin graphic be clickable? Gray pixels are effective border not buttons.

[ps]

More I look on this buttons more I like them, first I thought that they do not fit UFO aesthetic but quality of robin graphic surpass it :)

9
Help / Re: code snip help please
« on: February 09, 2021, 12:19:48 pm »
Ok, after digging to code I saw that I make mistake, I handled `statChange` same as `unit.Exp`,
but at end of mission there is special code that update base stats too (like TU) if you have any exp (and this is different to other stats that each have own exp).
This mean I block access info how this stats changed.

Beside that, you still have access to `soldier.Stats.setTimeUnits` etc. (previously I was referring only to types that give you errors).
If you want to know what what limits there are you can use e.g.
Code: [Select]
var ptr RuleSoldier rule;

soldier.getRuleSoldier rule;

rule.StatsCap.getTimeUnits temp;

rule.StatsMin.getTimeUnits temp;

rule.StatsMax.getTimeUnits temp;


10
Help / Re: code snip help please
« on: February 09, 2021, 12:19:55 am »
`getTimeUnits` do not exists for this types. This is because game handle them differently in exp grains (this is this stas you can see on main battle scape screen).
if you use `getBravery`(or other similar) this should work.

11
Help / Re: code snip help please
« on: February 08, 2021, 05:38:08 pm »
This is not commands, this is hints where here find data you need.
Operation would look like `soldier.Stats.getTimeUnits tu;`.

If you want to know full list of operations in script you need enable verbose logging in config, with this script will dump all meta information about every script hook to logs.

beside when you get error in any program you should post it in your question, because it is critical to understand what go wrong.

12
Help / Re: code snip help please
« on: February 08, 2021, 03:02:36 pm »
What you mean by "why doesnt this work"? what you tried exactly and what exact result was.

13
Help / Re: how-to settup debug_log?
« on: February 08, 2021, 11:43:56 am »
you need have enable debug mode in config

14
Help / Re: soldier ezperience
« on: February 08, 2021, 01:18:49 am »
Yes, but you need remember that `soldier` is name of variable that have solider data of given unit.
In some scripts your code could look like:

Code: [Select]
s.Stats.getStamina temp;
add temp 10; #add some point to current unit stat value
s.Stats.setStamina temp;

15
Resources / Re: [UNIT][GRAPHICS] Gemini
« on: February 06, 2021, 12:46:28 am »
I think that was about hit animation. Death animation expanding would be cool, but I suppose it's much harder to implement.
Right, that was hit animation, and probably not so much, only problem is that this need be check in multiple places.

Pages: [1] 2 3 ... 159