Author Topic: Revised Module: Small Village Woes (1.24)  (Read 4265 times)

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #45 on: July 01, 2014, 06:18:04 am »


               

Link the script, please.


 


I'm *guessing* you have


 


if (GetLevelByClass(CLERIC) == 1)  blah blah


 


when you just neeed


 


if (GetLevelByClass(CLERIC)) blah blah


 


Obviously that's not the actual code but that would match your problem.



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #46 on: July 01, 2014, 03:06:09 pm »


               

As indicated below, I don't currently have the script looking for a set Class Level in the "Text Appears When..." field. My thinking was the script would simply identify any level of the class and return TRUE when needed, which is what I'm looking to do with the script.


 


Thanks for the help clearing this up!


 


Discount Price Script:



#include "nw_i0_tool"

int nWizard = CLASS_TYPE_WIZARD;
int nSorcerer = CLASS_TYPE_SORCERER;

int StartingConditional()
{
object oPC = GetPCSpeaker();
if(GetGold(oPC) > 24 && (GetLevelByClass(nWizard, oPC) || GetLevelByClass(nSorcerer, oPC)))

return TRUE;

return FALSE;
}

Full Price Script:



#include "nw_i0_tool"

int nWizard = CLASS_TYPE_WIZARD;
int nSorcerer = CLASS_TYPE_SORCERER;

int StartingConditional()
{
object oPC = GetPCSpeaker();
if(GetGold(oPC) < 50 || GetLevelByClass(nWizard, oPC) == TRUE || GetLevelByClass(nSorcerer, oPC) == TRUE)

return FALSE;

return TRUE;
}


               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #47 on: July 01, 2014, 04:40:29 pm »


               

What exactly is the behavior that you're seeing?


 


Also, try changing


 


if(GetGold(oPC) < 50 || GetLevelByClass(nWizard, oPC) == TRUE || GetLevelByClass(nSorcerer, oPC) == TRUE)


 


to


 


if(GetGold(oPC) < 50 || GetLevelByClass(nWizard, oPC) || GetLevelByClass(nSorcerer, oPC))


 


and see if that helps.



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #48 on: July 01, 2014, 05:48:53 pm »


               

What I'm seeing is when a PC of these class types is beyond Level 1, the class check doesn't work, and all dialogue-based purchase options are visible depending on if they do or don't have enough money to purchase the item (which you experienced, I believe MM, in your play-through of the module). If a PC of these class types is level 1, the scripts function as intended.


For all non-affiliated PCs of all other class types, the scripts function as intended.


 


(I have not tried your above suggestion yet.)



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #49 on: July 01, 2014, 07:02:11 pm »


               

Did a quick test during lunch break -- TRUE is read as 1 only.  In the test I got the following...


 


3 != TRUE


1 == TRUE


0 != TRUE


 


The last result is obvious but the first is not.  So the change I made above will fix your problem, I think.



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #50 on: July 01, 2014, 07:32:06 pm »


               


Did a quick test during lunch break -- TRUE is read as 1 only.  In the test I got the following...


 


3 != TRUE


1 == TRUE


0 != TRUE


 


The last result is obvious but the first is not.  So the change I made above will fix your problem, I think.




 


So, I should change the " == TRUE)" portion of the script to "3 != TRUE"?


My apologies for the silly question. I stopped coding in 2002 to embark on a theatre acting and directing career, so there are still many cobwebs yet to be cleaned up in my memory of the aurora scripting language. '<img'> And actually, editing my previous script examples with your code changes would probably be best for a big dumb jerk like me. '<img'>


 


Thanks for the follow-up assistance in advance!

 



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #51 on: July 01, 2014, 07:51:28 pm »


               

No, the "change above" refers to this post.



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #52 on: July 01, 2014, 08:02:35 pm »


               

Thank ye!



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #53 on: July 02, 2014, 03:02:17 am »


               Small Village Woes v1.30 Update | 7.1.04 [SPOILERS BELOW]:


Once again, most of my time today was spent focusing on the various merchants, but some other edits were made, too.

Merchant Fixes - Detail work.


a.) Witch Wizard/Sorcerer alignment discount error fixed. (Thanks, MM!)

b.) Fixed Willy sell-back items error. (*see below for more info.)

c. Fixed Brother Billy ACT 1 cleric/paladin alignment discount error. (Thanks, MM!)

d.) Brother Billy ACT 3 merchant dialogue options fixed.

e.) Capped merchant spell scrolls at Level 6. Removed higher level spell scrolls than 6.

f.) Witch now lists price of sellable undead parts.

g.) Witch and Billy reference not needing to cleanse undead parts before selling them.

h.) Increased price of Fireball Scroll, Decreased price of Sanctuary Scroll.

i.) Copied some formatting examples between all of the merchants to help make the system look more uniform.

ADDITIONAL NOTES -


a.) The merchant alignment fix came from deleting the "== TRUE" portion of the script.


(*Sell-back error: MM, I tested selling back the great ax and long sword, and both worked for me. Considering that you possibly meant the looted Br'ei ax and sword, I tested those as well. I was able to sell back all items except for the "Women's Clothing" that you mentioned.)


I'm very close to finishing up with these initial notes (mostly by MM). I'm very excited to release another BETA build soon for further review. Clearly, this module has never had this degree of polish.
               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #54 on: July 02, 2014, 03:49:30 am »


               

Considering that you possible meant the looted Br'ei ax and sword, I tested those as well.


 


Don't know what to tell you.


 


SmallVillageWoes_zps621b99b5.jpg



Could only sell the crossbow.



               
               

               
            

Legacy_BortSonofBort

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #55 on: July 02, 2014, 04:01:08 am »


               I love screenshots! I'll look it over again.


Your help stamping out these bugs is more appreciated than you might possibly know.
               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #56 on: July 02, 2014, 04:13:44 am »


               

Is it possible you changed one of the scripts dealing with this?  It IS possible that your version works but my (older) one does not.


 


And perhaps, but I know firsthand how aggravating bugs are '<img'>  Trying to squash one right now in my own module.



               
               

               
            

Legacy_Bort_Son_of_Bort

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #57 on: July 02, 2014, 04:37:54 am »


               


Is it possible you changed one of the scripts dealing with this?  It IS possible that your version works but my (older) one does not.


 


And perhaps, but I know firsthand how aggravating bugs are '<img'>  Trying to squash one right now in my own module.




 


I think what's more likely is that I have two instances of the Br'ei Ax and Sword that I didn't realize were in the game, and I'm checking the blueprint res ref of the wrong versions. Unfortunately, I only have a MAC laptop at home, so I have to wait until I go to work tomorrow.


Oh, I'm sure you do know how aggravating they are. But it's not just bugs to me. It's more about putting in the effort to help me maximize the quality of this module twelve years later after its original release. My reason for bringing this back around was to maximize it in its current form so I could put it to bed, which as I'm experiencing it, would not be possible without your input.



               
               

               
            

Legacy_MagicalMaster

  • Hero Member
  • *****
  • Posts: 2712
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #58 on: July 02, 2014, 04:44:11 am »


               

It's possible about the instances -- those two are from the inn, if it helps.


 


And happy to help -- I'm not kidding when I say this game quite literally changed my life, shifted me from a future in law to "You know, this programming stuff is kind of interesting...maybe I should make a career out of it."



               
               

               
            

Legacy_werelynx

  • Hero Member
  • *****
  • Posts: 1110
  • Karma: +0/-0
Revised Module: Small Village Woes (1.24)
« Reply #59 on: July 02, 2014, 03:26:39 pm »


               

Just a question: if I have a halfling, would I be able to sell greatsword if I can't wield it?