Author Topic: Some Basic "Scripting"? Questions  (Read 410 times)

Legacy_modtyrant

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« on: April 04, 2013, 02:44:12 am »


               Hello!!

I am a complete noob when it comes to scripting, i don't even really know how to script (can't make any scripts) but i am learning and i know enough to edit exsisting scripts by replacing the more easily understood "data" if that's the right word to use. I can also stich some scripts together, if they are not overly complicated.

If i don't have to script to make what is below, that would be great to know how to do this without scripting, even though i will eventually make this into a scripted mod because it would probably work better that way.

Any ways, here are my questions.

1.Is it possible to change weapon damages and make them have static values (no dice). For an example
   a great sword deals 2D6 but i would want to change it to 12 damage, no random-ness.

2.Can i make all the spells into feats?

3.Is it possible to stop the D20 from rolling (completly stop it 100%). This includes all
    D20 checks: Skill Checks, AC, Attack, Saving Throws etc. Any thing that the D20
    rolls on, it will no longer roll (including critcal hits and critical failure).

4.Are cool downs possible on spells and feats?

5.Can i make a skill with 1 rank register in combat as if it was 100 value, even though it says 1
    in the skill menu?

6.Is it possible to give each weapon special abilities designed for them but it does not increase
   it's cost. For example all Daggers would give an extra sneak attack because their daggers but
   this would show up in the weapons information rather as an enchantment. Essentially make
   all weapons slightly more conditional (more specialization).

   Also is it possible to have these new values show up correctly in the toolset when creating
   new items that have higher damages and conditional abilities.

If you can awnser these questions and or give me resource links for learning more about how to acomplish the above, would be greatly appreciated.

Thanks soooooo much!   '<img'>
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #1 on: April 04, 2013, 03:35:54 am »


               1. The damage dice are found in the file baseitems.2da under the columns "NumDice" and "DietoRoll".  To make 12 (constant) damage find the row for greatsword and set the entry under "NumDice" to 12 and "DietoRoll" to 1.

2.  You can add more feats to feat.2da with spell ID entered in the "SpellID" column (this number corresponds to the row for the spell in spells.2da.  One drawback of making these feats is that they will no longer perform a spell resistance check.

3.  You can only affect the scripted rolls.  Hard-coded ones (like for picketpocketing, disabling a trap, and critical hit determination) cannot be altered.

4. For feats, you can increment and decrement uses on a delayed command within the script.

5.  Combat is mostly hard-coded, you can give a skill increase effect to compensate though.

6.  You can remove the StringReference IDs from itempropsdef.2da and associated 2das to make this property invisible when added to any item.  You cannot effect daggers only though.
               
               

               
            

Legacy_modtyrant

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #2 on: April 04, 2013, 03:41:21 am »


               Awesome!!

I will have to increase the numbers than, so that the D20 becomes insignificant because it's so small.

Haha, stupid question but can i have it roll 10,000 D1s or more?

EDIT:

Well crap, it seems the max damage is 164. It just keeps doing that even though i set it for 100,000 D1s.

Could i get around this with scripting. Essentially i was trying to make it where 1-20 "points" on the roll
would never effect any thing because it's soooo low.

I could do increments of 50 or 100. For D20 checks, maybe.
               
               

               


                     Modifié par modtyrant, 04 avril 2013 - 03:04 .
                     
                  


            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #3 on: April 04, 2013, 04:04:58 am »


               

modtyrant wrote...

Awesome!!

I will have to increase the numbers than, so that the D20 becomes insignificant because it's so small.

Haha, stupid question but can i have it roll 10,000 D1s or more?

EDIT:

Well crap, it seems the max damage is 164. It just keeps doing that even though i set it for 100,000 D1s.

Could i get around this with scripting. Essentially i was trying to make it where 1-20 "points" on the roll
would never effect any thing because it's soooo low.


Did you include the comma with 100,000?  If so it will not know how to read the comma and will read the entry as 100.
               
               

               
            

Legacy_modtyrant

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #4 on: April 04, 2013, 04:27:04 am »


               No i did not use a comma. I tried 10,000 (without comma of course) and the damage went up to 224. Really weird.
               
               

               
            

Legacy_the.gray.fox

  • Full Member
  • ***
  • Posts: 214
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #5 on: April 05, 2013, 02:03:56 pm »


               You do not want to inflict more than 10000 (ten thousands) damage points anyway.

Deal more than that in a single hit (even just 10001), and you are liable to run into unrecoverable bugs.
In any case a creature's max life is 10000. To bypass such limit you must resort to VERY creative scripting, create a bunch of custom resources, and also mod every last weapon in game.
While it *is* possible (I did it once, for fun), the end result is hardly worth the effort.


-fox
               
               

               


                     Modifié par the.gray.fox, 05 avril 2013 - 01:07 .
                     
                  


            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #6 on: April 05, 2013, 05:10:06 pm »


               

the.gray.fox wrote...

In any case a creature's max life is 10000.


Technically, it's something like 13,620 due to constitution modifiers and feats like Toughness.  Also have to factor in potential damage immunity - if something has 95% immunity to all damage, that's effectively 272,400 hit points.

Still not quite sure how he's trying to replace the d20 system for rolls - honestly, if anything it sounds like he should just do something like give everyone a 20 AC penalty for so attacks hit except for rolling a 1.  Which also means every attack that threatens critical will critical, for what it's worth.
               
               

               
            

Legacy_the.gray.fox

  • Full Member
  • ***
  • Posts: 214
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #7 on: April 05, 2013, 06:23:01 pm »


               Thanks for pointing that out.
The max life of 10K from my post was off a base creature with nothing fancy on. A reminiscence from past tests.

Nevertheless, the 10K dmg limit per single hit stands correct. I found my old notes, here I described the bugs one can run into when inflicting over 10K dmg. Here too, the test scenario was setup with vanilla creatures.
Quoting myself:

For this demo I chose a damage of 10000 because it is the
maximum amount that can be dealt in 1 hit.
Trying to deal 10001 or more damage can result in a strange
and unrecoverable bug, wherein the struck creature appears
to suffer only 1 damage point (the engine will display that much with the blue floating number), yet her HP suddenly
turn negative, the creature enters in a Dead state...
But the Dead creature continues to stand on her feet.
If that creature is a Player Character, the player may even
click on the ground to issue move commands, and the creature
will move as requested. The inventory panel may be brought
up as well, but no item may be interacted with.
No other attempt to interact with the game world will
succeed as well.
And finally, the creature disappears from the creature list
into the DM Chooser window.



-fox
               
               

               


                     Modifié par the.gray.fox, 05 avril 2013 - 05:26 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #8 on: April 05, 2013, 07:45:13 pm »


               

MagicalMaster wrote...
Technically, it's something like 13,620 due to constitution modifiers and feats like Toughness.  Also have to factor in potential damage immunity - if something has 95% immunity to all damage, that's effectively 272,400 hit points.

By that logic, you would also have to factor in regeneration, making the maximum effectively infinite.

Funky
               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #9 on: April 05, 2013, 09:37:11 pm »


               

the.gray.fox wrote...

Nevertheless, the 10K dmg limit per single hit stands correct. I found my old notes, here I described the bugs one can run into when inflicting over 10K dmg. Here too, the test scenario was setup with vanilla creatures.
Quoting myself:

For this demo I chose a damage of 10000 because it is the maximum amount that can be dealt in 1 hit. Trying to deal 10001 or more damage can result in a strange and unrecoverable bug, wherein the struck creature appears to suffer only 1 damage point (the engine will display that much with the blue floating number), yet her HP  suddenly turn negative, the creature enters in a Dead state... But the Dead creature continues to stand on her feet. If that creature is a Player Character, the player may even click in the ground to issue move commands, and the creature will move as requested. The inventory panel may be brought up as well, but no item may be interacted with. No other attempt to interact with the game world will succeed as well. And finally, the creature disappears from the creature list into the DM Chooser window.


Oh, I wasn't saying you were wrong about >10k bugging out, just pointing out there are reasons why someone could potentially want to deal >10k on a hit.

I just tried your experiment out of curiosity - I got the same bug of the damage dropping down to 1, but the creture didn't die or have anything weird happen beyond apparently only taking 1 damage (though that may be because I took an Ancient Red Dragon and bumped its HP up to 10000 base, so it had >10k - did your creature have exactly 10k?).

FunkySwerve wrote...

By that logic, you would also have to factor in regeneration, making the maximum effectively infinite.

Funky


Not really, because regeneration doesn't apply to single hits.  If you have 1000 HP, 0% immunity, and 50000 regeneration per round...you'll still die if you get hit for 1000.  The regen won't matter.

If you mean over time, then sure, if your regen outstrips the damage you take you have effectively infinite life.
               
               

               
            

Legacy_the.gray.fox

  • Full Member
  • ***
  • Posts: 214
  • Karma: +0/-0
Some Basic "Scripting"? Questions
« Reply #10 on: April 06, 2013, 05:29:12 pm »


               

MagicalMaster wrote...

I just tried your experiment out of curiosity - I got the same bug of the damage dropping down to 1, but the creture didn't die [...] may be because [...] it had >10k - did your creature have exactly 10k?).


In short, I do not remember.

About 2 years ago I was making experiments to see how much I could bend the engine to my will -- without using NWNX.
While at it, I was also defining the rules for a gameplay radically different than D&D. I do not feel to exclude that the creature was set to exactly 10K HP to meet my criteria.

But when I noticed the bugs I described, I steered the thing in a different direction, giving everyone only 1 HP max and handling life amounts and damages dealt in a way that would bypass the 10K limit (by 5 and 6 orders of magnitude respectively, in fact). Thus I dropped the bugs and have not experimented with them further.


-fox
               
               

               


                     Modifié par the.gray.fox, 06 avril 2013 - 04:29 .