Author Topic: [Examples] More Y-Script examples  (Read 12579 times)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3405
    • View Profile
Re: More ModScript examples
« Reply #15 on: July 16, 2020, 02:29:58 am »
`battle_action` is value you seek for point 1)
Second point is on TODO list. Probably in this month I will have some things finished.

Offline KingMob4313

  • Commander
  • *****
  • Posts: 543
  • Never let me down again.
    • View Profile
    • Mod Hub for Equal Terms 2.0
Re: More ModScript examples
« Reply #16 on: July 17, 2020, 12:35:36 am »
`battle_action` is value you seek for point 1)
Second point is on TODO list. Probably in this month I will have some things finished.

Thank you, Yankes, but no need to hurry.

The scripting is pretty intuitive as long as the scope is limited.  Still figuring out how to go from mode to mode, but the examples provided help.

I've just been playing with different things.  Got it to stop happening for smoke pretty easily and have it re-rolling damage rolls if the damage is under orig_power so that it will give base damage to 150% on a crit.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3405
    • View Profile
Re: More ModScript examples
« Reply #17 on: August 02, 2020, 05:56:00 pm »
I now added support to query damage type of rule item, two new operations `getDamageType` and `getMeleeDamageType`, each one return object that can be check for exact bonuses or random logic its use.

Offline zee_ra

  • Colonel
  • ****
  • Posts: 213
    • View Profile
Re: More ModScript examples
« Reply #18 on: December 07, 2023, 01:12:58 pm »

Yes, this is one option, and then in script (`hitUnit`) manually subtract armor value using your own logic. Probaby better is alter effectiveness  as is not avaiable to scripts right now (unit armor is).

Loops are on my TODO, this is bit tricky because I need made some refactors to make them easy to use and safe (I would prefer that scripts can't hang whole game).

@Yankes,

How should I approach changing the damage type?  I know, I could read the damage type of a clip by checking the damaging_type variable.  However, I do not see a way to alter the damaging_type.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3405
    • View Profile
Re: [Examples] More Y-Script examples
« Reply #19 on: January 20, 2024, 08:46:46 pm »
Some random example of new custom vapor:
Code: [Select]

  - update: STR_BLASTER_BOMB
    power: 10
    blastRadius: 2
    vaporColorSurface: 6
    vaporDensitySurface: 10
    vaporProbabilitySurface: 100
    scripts:
      vaporParticleAmmo: |
        var int temp;
       
        set subvoxel_velocity subvoxel_trajectory_forward;
        muldiv subvoxel_velocity -3 2;
       
        random.randomRangeSymmetric temp 100;
        subvoxel_velocity.addX temp;
        random.randomRangeSymmetric temp 100;
        subvoxel_velocity.addY temp;
        random.randomRangeSymmetric temp 100;
        subvoxel_velocity.addZ temp;
       
        begin;
          var int last 6000;
          sub last subvoxel_trajectory_distance_max;
          add last subvoxel_trajectory_distance;
         
          if gt last 0;
            set temp 100;
            muldiv temp last 6000;
            random.randomChance temp;
            if gt temp 0;
              muldiv subvoxel_velocity last 6000;
            end;
          else lt subvoxel_trajectory_distance 6000;
            muldiv subvoxel_velocity subvoxel_trajectory_distance 6000;
          end;
        end;
        subvoxel_velocity.addZ 200;
        return;
  - update: STR_LASER_RIFLE
    vaporColorSurface: 5
    vaporDensitySurface: 1
    vaporProbabilitySurface: 100
    scripts:
      vaporParticleAmmo: |
        # noting
        return;
  - update: STR_RIFLE_CLIP
    vaporColorSurface: 2
    vaporDensitySurface: 17
    vaporProbabilitySurface: 100
    scripts:
      vaporParticleAmmo: |
        var int off;
        var int temp;
       
        if lt particle_number 3;
          var Position up subvoxel_trajectory_up;
          var Position right subvoxel_trajectory_right;
          var int sin;
          var int cos;
         
          set sin subvoxel_trajectory_distance;
          set cos subvoxel_trajectory_distance;
         
          wavegen_sin sin 10000 8;
          wavegen_cos cos 10000 8;
         
          mul up sin;
          mul right cos;
         
          set subvoxel_offset up;
          add subvoxel_offset right;
          set subvoxel_velocity 0 0 0;
          set subvoxel_acceleration 0 0 0;
          set subvoxel_drift 10;
         
          set subvoxel_velocity subvoxel_trajectory_forward;
          mul subvoxel_velocity -1;
         
        else lt particle_number 5;
       
          add vapor_color -2;
          set subvoxel_drift 50;
          set subvoxel_velocity subvoxel_trajectory_forward;
        else lt particle_number 12;
          # set off subvoxel_trajectory_distance;
          # wavegen_sin off 1200 5;
          set vapor_color -1;
          # add vapor_color +1;
          # set subvoxel_velocity 0 0 150;
          # set subvoxel_acceleration 0 0 off;
        else;
          var int sin;
          var int last 6400;
          sub last subvoxel_trajectory_distance_max;
          add last subvoxel_trajectory_distance;
          if gt last 0;
            #hit point
            add vapor_color -2;
            set subvoxel_offset subvoxel_trajectory_forward;
            muldiv subvoxel_offset last 256;
           
            random.randomRangeSymmetric temp 500;
            subvoxel_velocity.setX temp;
            random.randomRangeSymmetric temp 500;
            subvoxel_velocity.setY temp;
            random.randomRangeSymmetric temp 500;
            subvoxel_velocity.setZ temp;
           
            set subvoxel_acceleration subvoxel_velocity;
            muldiv subvoxel_acceleration -1 50;
          else lt subvoxel_trajectory_distance 6000;
            add vapor_color +1;
            #start trajectory
           
           
            set subvoxel_velocity subvoxel_trajectory_forward;
            mul subvoxel_velocity -4;
           
            random.randomRangeSymmetric temp 100;
            subvoxel_velocity.addX temp;
            random.randomRangeSymmetric temp 100;
            subvoxel_velocity.addY temp;
            random.randomRangeSymmetric temp 100;
            subvoxel_velocity.addZ temp;
           
            set subvoxel_acceleration 0 0 -10;
          else;
            # set sin subvoxel_trajectory_distance;
           
            # wavegen_sin sin 1000 -12;
            # add vapor_color -1;
            # set subvoxel_acceleration 0 0 sin;
            # set subvoxel_drift 1000;
           
            # set vapor_color -1;
          end;
        end;
       
        return;
In next week I prepare more concrete examples of some popular weapons trails.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2046
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: More ModScript examples
« Reply #20 on: January 02, 2025, 02:31:16 pm »
I will put this here, since I do not know where to put this otherwise ;)

Code: [Select]
# weapon proficicency system - by memmaker
#
# how to use: flag weapons with WEAPON_TYPE tags
# eg. You decide all shotguns are weapon type 3
# Then you would have something like this:
# items:
#   - type: STR_SHOTGUN
#     tags:
#       WEAPON_TYPE: 4 # shotguns
#   - type: STR_ALLOY_SHOTGUN
#     tags:
#       WEAPON_TYPE: 4 # shotguns
#
# You can decide which WEAPON_TYPE entry to use by using this table:
#
# Type 1 -> WEAPON_TYPE: 1
# Type 2 -> WEAPON_TYPE: 2
# Type 3 -> WEAPON_TYPE: 4
# Type 4 -> WEAPON_TYPE: 8
# Type 5 -> WEAPON_TYPE: 16
# Type 6 -> WEAPON_TYPE: 32
# Type 7 -> WEAPON_TYPE: 64
# Type 8 -> WEAPON_TYPE: 128
#
# NOTE1: The current script only allows for a maximum of 8 different weapon types. Could be expanded.
#
# All hits with weapons which are tagged with WEAPON_TYPE will be tracked.
# After the hit_limit is reached (search for "set hit_limit" if you want change it),
# the soldier is awarded the proficiency with this weapon type.
#
# A soldier's accuracy with a proficient weapon is increased (defined at "set accuracy_bonus").
# IMPORTANT: If a soldier has weapons in both hands the bonus of the right hand weapon is applied.
#            The technical reason for this is, that we do not know for which item an accuracy bonus is being calculated.
#            Also, having a proficient weapon equipped also boosts PSI accuracy, since the bonus is not bound
#            to a specific action.

extraStrings:
  - type: en-US
    strings:
      STR_PROFICIENT_MESSAGE_TYPE1: "Soldier became proficient with TYPE1"
      STR_PROFICIENT_MESSAGE_TYPE2: "Soldier became proficient with TYPE2"
      STR_PROFICIENT_MESSAGE_TYPE3: "Soldier became proficient with TYPE3"
      STR_PROFICIENT_MESSAGE_TYPE4: "Soldier became proficient with TYPE4"
      STR_PROFICIENT_MESSAGE_TYPE5: "Soldier became proficient with TYPE5"
      STR_PROFICIENT_MESSAGE_TYPE6: "Soldier became proficient with TYPE6"
      STR_PROFICIENT_MESSAGE_TYPE7: "Soldier became proficient with TYPE7"
      STR_PROFICIENT_MESSAGE_TYPE8: "Soldier became proficient with TYPE8"
   
extended:
  tags:
    GeoscapeSoldier:
      WEAPON_PROFICIENCY_FLAGS: int # 8 bits of flags, one for each weapon type
      EXP_WITH_TYPE1: int   # tracks the hits a soldier made with these weapon types
      EXP_WITH_TYPE2: int
      EXP_WITH_TYPE3: int
      EXP_WITH_TYPE4: int
      EXP_WITH_TYPE5: int
      EXP_WITH_TYPE6: int
      EXP_WITH_TYPE7: int
      EXP_WITH_TYPE8: int
    BattleUnit:
      HITS_WITH_TYPE1: int   # tracks the hits a unit makes with the specific weapon type during a mission
      HITS_WITH_TYPE2: int
      HITS_WITH_TYPE3: int
      HITS_WITH_TYPE4: int
      HITS_WITH_TYPE5: int
      HITS_WITH_TYPE6: int
      HITS_WITH_TYPE7: int
      HITS_WITH_TYPE8: int
    RuleItem:
      WEAPON_TYPE: int # one of, 0 = none, 1 = type 1, 2 = type 2, 4 = type 3, 8 = type 4, 16, 32, 64, 128
  scripts:
    hitUnit:
      - offset: 66   # get weapon type, track hit for that weapon type on unit
        code: |
          var ptr RuleItem item_rule;
          var int weapon_type;
          var int temp;
          var int hit_limit;
          var int exp;
          var int wp_flags;
          var ptre GeoscapeSoldier soldier;
          var ptr RuleSoldier soldier_rule; # replace with getFaction code, when available
         
          unit.getRuleSoldier soldier_rule;

          set hit_limit 30; # award weapon proficiency after this number of hits..

          if neq soldier_rule null; # is xcom unit
            unit.getGeoscapeSoldier soldier;
           
            damaging_item.getRuleItem item_rule;
            item_rule.getTag weapon_type Tag.WEAPON_TYPE;

            if eq weapon_type 1;
              soldier.getTag exp Tag.EXP_WITH_TYPE1;
              unit.getTag temp Tag.HITS_WITH_TYPE1;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE1 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE1";
              end;
            else eq weapon_type 2;
              soldier.getTag exp Tag.EXP_WITH_TYPE2;
              unit.getTag temp Tag.HITS_WITH_TYPE2;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE2 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE2";
              end;
            else eq weapon_type 4;
              soldier.getTag exp Tag.EXP_WITH_TYPE3;
              unit.getTag temp Tag.HITS_WITH_TYPE3;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE3 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE3";
              end;
            else eq weapon_type 8;
              soldier.getTag exp Tag.EXP_WITH_TYPE4;
              unit.getTag temp Tag.HITS_WITH_TYPE4;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE4 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE4";
              end;
            else eq weapon_type 16;
              soldier.getTag exp Tag.EXP_WITH_TYPE5;
              unit.getTag temp Tag.HITS_WITH_TYPE5;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE5 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE5";
              end;
            else eq weapon_type 32;
              soldier.getTag exp Tag.EXP_WITH_TYPE6;
              unit.getTag temp Tag.HITS_WITH_TYPE6;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE6 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE6";
              end;
            else eq weapon_type 64;
              soldier.getTag exp Tag.EXP_WITH_TYPE7;
              unit.getTag temp Tag.HITS_WITH_TYPE7;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE7 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE7";
              end;
            else eq weapon_type 128;
              soldier.getTag exp Tag.EXP_WITH_TYPE8;
              unit.getTag temp Tag.HITS_WITH_TYPE8;
              add temp 1;
              unit.setTag Tag.HITS_WITH_TYPE8 temp;
              add exp temp;
              if ge exp hit_limit;
                soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;
                bit_or wp_flags weapon_type;
                soldier.setTag Tag.WEAPON_PROFICIENCY_FLAGS wp_flags;
                battle_game.flashMessage "STR_PROFICIENT_MESSAGE_TYPE8";
              end;
            end;
          end;
          return power part side;
    accuracyMultiplierBonusStats:
      - offset: 66   # check if unit is proficient with current weapon type, boost accuracy
        code: |
          var ptr RuleItem item_rule;
          var ptr BattleItem weapon;
          var int weapon_type;
          var int temp;
          var int wp_flags;
          var ptr GeoscapeSoldier soldier;
          var int accuracy_bonus;
          var ptr RuleSoldier soldier_rule; # replace with getFaction code, when available

          set accuracy_bonus 10; # adjusts the bonus accuracy for handling proficient weapons

          unit.getRuleSoldier soldier_rule;

          if neq soldier_rule null; # is xcom unit
            unit.getGeoscapeSoldier soldier;
            soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;

            unit.getRightHandWeapon weapon;
            if eq weapon null;
              unit.getLeftHandWeapon weapon;
            end;
            if neq weapon null;
              weapon.getRuleItem item_rule;
              item_rule.getTag weapon_type Tag.WEAPON_TYPE;

              bit_and wp_flags weapon_type;

              if neq wp_flags 0;
                # soldier is proficient in this weapon type
                add bonus accuracy_bonus;
                debug_log "Weapon proficiency bonus added: " unit weapon;
              end;
            end;
          end;
          return bonus;
    meleeMultiplierBonusStats:
      - offset: 66   # check if unit is proficient with current weapon type, boost accuracy
        code: |
          var ptr RuleItem item_rule;
          var ptr BattleItem weapon;
          var int weapon_type;
          var int temp;
          var int wp_flags;
          var ptr GeoscapeSoldier soldier;
          var int accuracy_bonus;
          var ptr RuleSoldier soldier_rule; # replace with getFaction code, when available

          set accuracy_bonus 10; # adjusts the bonus accuracy for handling proficient weapons

          unit.getRuleSoldier soldier_rule;

          if neq soldier_rule null; # is xcom unit
            unit.getGeoscapeSoldier soldier;
            soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;

            unit.getRightHandWeapon weapon;
            if eq weapon null;
              unit.getLeftHandWeapon weapon;
            end;
            if neq weapon null;
              weapon.getRuleItem item_rule;
              item_rule.getTag weapon_type Tag.WEAPON_TYPE;

              bit_and wp_flags weapon_type;

              if neq wp_flags 0;
                # soldier is proficient in this weapon type
                add bonus accuracy_bonus;
                debug_log "Weapon proficiency bonus added: " unit weapon;
              end;
            end;
          end;
          return bonus;   
    throwMultiplierBonusStats:
      - offset: 66   # check if unit is proficient with current weapon type, boost accuracy
        code: |
          var ptr RuleItem item_rule;
          var ptr BattleItem weapon;
          var int weapon_type;
          var int temp;
          var int wp_flags;
          var ptr GeoscapeSoldier soldier;
          var int accuracy_bonus;
          var ptr RuleSoldier soldier_rule; # replace with getFaction code, when available

          set accuracy_bonus 10; # adjusts the bonus accuracy for handling proficient weapons

          unit.getRuleSoldier soldier_rule;

          if neq soldier_rule null; # is xcom unit
            unit.getGeoscapeSoldier soldier;
            soldier.getTag wp_flags Tag.WEAPON_PROFICIENCY_FLAGS;

            unit.getRightHandWeapon weapon;
            if eq weapon null;
              unit.getLeftHandWeapon weapon;
            end;
            if neq weapon null;
              weapon.getRuleItem item_rule;
              item_rule.getTag weapon_type Tag.WEAPON_TYPE;

              bit_and wp_flags weapon_type;

              if neq wp_flags 0;
                # soldier is proficient in this weapon type
                add bonus accuracy_bonus;
                debug_log "Weapon proficiency bonus added: " unit weapon;
              end;
            end;
          end;
          return bonus;
    returnFromMissionUnit:
      - offset: 66   # transfer hits from battlescape unit to geoscape soldier, award weapon proficiency when limit is hit
        code: |
          var int hits;
          var int exp;

          unit.getTag hits Tag.HITS_WITH_TYPE1;
          soldier.getTag exp Tag.EXP_WITH_TYPE1;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE1 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE2;
          soldier.getTag exp Tag.EXP_WITH_TYPE2;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE2 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE3;
          soldier.getTag exp Tag.EXP_WITH_TYPE3;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE3 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE4;
          soldier.getTag exp Tag.EXP_WITH_TYPE4;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE4 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE5;
          soldier.getTag exp Tag.EXP_WITH_TYPE5;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE5 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE6;
          soldier.getTag exp Tag.EXP_WITH_TYPE6;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE6 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE7;
          soldier.getTag exp Tag.EXP_WITH_TYPE7;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE7 exp;

          unit.getTag hits Tag.HITS_WITH_TYPE8;
          soldier.getTag exp Tag.EXP_WITH_TYPE8;
          add exp hits;
          soldier.setTag Tag.EXP_WITH_TYPE8 exp;

          return;

Any chance to make this directly work based upon soldierDiaryentries? (totalKillsWithAWeapon)

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3405
    • View Profile
Re: [Examples] More Y-Script examples
« Reply #21 on: January 02, 2025, 03:00:31 pm »
Right now `soldierDiaryentries` are not exposed to scripts. When I have some time I could check how easy would add some getters there.

Offline hellrazor

  • Commander
  • *****
  • Posts: 2046
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: [Examples] More Y-Script examples
« Reply #22 on: January 02, 2025, 04:26:11 pm »
Right now `soldierDiaryentries` are not exposed to scripts. When I have some time I could check how easy would add some getters there.

Would be nice to have some tiny bonuses applied, via commendation, when becoming profient with a weapon, tracked via soldier diaries. It would also mean it is applicable for older savegames and gets retroactive granted.

I am wondering if it would be possible to also give reductions to enemies attempting to shoot a soldier, who shoot at before and awarded a Medal with totalShotAt10Times.

Ok without exposure this is something to be dreaming about in the future.
Thanks for your work and considering this.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9309
    • View Profile
Re: [Examples] More Y-Script examples
« Reply #23 on: January 02, 2025, 04:46:20 pm »
Would be nice to have some tiny bonuses applied, via commendation, when becoming profient with a weapon, tracked via soldier diaries. It would also mean it is applicable for older savegames and gets retroactive granted.

Commendations can be linked to soldier bonuses: https://openxcom.org/forum/index.php/topic,7405.msg116840.html#msg116840
Even without scripting.
Mods like XcomFiles already do that, have a look if such bonuses are enough for you.

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3405
    • View Profile
Re: [Examples] More Y-Script examples
« Reply #24 on: January 03, 2025, 02:19:06 am »
Funny to forget features you add yourself :D

Offline hellrazor

  • Commander
  • *****
  • Posts: 2046
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: [Examples] More Y-Script examples
« Reply #25 on: January 24, 2025, 04:44:05 pm »
Commendations can be linked to soldier bonuses: https://openxcom.org/forum/index.php/topic,7405.msg116840.html#msg116840
Even without scripting.
Mods like XcomFiles already do that, have a look if such bonuses are enough for you.

Thanks for pointing this out. I thought it would two different things. Now i can start working on things.