Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Savage Worlds

Notices

Reply
 
Thread Tools Display Modes
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 12th, 2017, 05:51 PM
Ok, so this is likely for CC or perhaps one or two others people who have deep insight into the application functionality. I have a feeling I know the answer, but I am going to ask anyway. Honestly, i am more curious than anything else!

There is a procedure named Money which formats, well... money. This is called from equipment.str(( part of it is below from the field grCost):

Code:
         var moneyvalue as number
          var money as string
          moneyvalue = @value
          call Money
          @text = money
          endif
Is there a method to override that in any way to change the "currency sign? Honestly, for Fantasy, I would want it to be "G" for gold(for example), while setting like the Pirates of the Spanish Main( do not have that setting, just using it for an example) might want to be "D" for doubloons.

Since it's called in a primary file, I assume the only way would be to copy the base folder, remove all of the "compiled" stuff and add in the source files from the source directory. Assuming that's the case, well, I am not going to do all that extra work just to change the currency symbol, but again, if I don't ask, I won't get.


For that matter, would it be possible in the long term to define a setting adjustment(or anywhere really) text field which the procedure would check before returning the final format(defaulting to $ of course). I don't know if it's possible or if some timing related stuff might not allow this... Heck, since I am asking for the moon here, in a perfect world, I could provide an image filename to output on display and if that's not found, it would fall back to the currency symbol text value in the settings adjustment.
jfrazierjr is offline   #1 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old May 12th, 2017, 06:15 PM
Obivously that code doesn't deal with changing the monetary symbol used. But there is thread where CC responded:

Quote:
I think you're out of luck on that one, as far as I know. All of the transactional code uses the base 10 decimal system. The most you might get away with is changing the money symbol, but that isn't simple.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #2 Reply With Quote
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 12th, 2017, 06:59 PM
Quote:
Originally Posted by zarlor View Post
Obivously that code doesn't deal with changing the monetary symbol used. But there is thread where CC responded:
I am going to feign ignorance here, but why do you say that code does not deal with the formatting of money? That procedure is called from sheet_standard1.dat as part of the display output, tab_journal, visual.dat. My understanding is that all of the things you SEE are script code in various "portals" and such.

Currently, those thing pass into the Money procedure an input value named moneyvalue and get back a output named money and that output value is what is used in the presentation layer. Adding additional input parameters to that procedure, and then defining such in the calling code locations should change the output.

Also note for the record, that the quoted thing was something entirely different and much more complex in implementation. The user was wanting to not only have three difference currency types, but have currency types based upon more complex mathematical equations while I was asking if we could simply change the single currency symbol with no changes to how the math was handled at all.

Last edited by jfrazierjr; May 12th, 2017 at 07:19 PM.
jfrazierjr is offline   #3 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old May 12th, 2017, 07:19 PM
Yeah, you may be totally right. I was reading that as defining the variable for monetary value rather than the symbol used but I can see where it could be part of defining "$". Not sure where "$" is inserted into that variable, mind you, but arguably wherever that is I would have though it could be left with a default value of "$" but maybe it could be available for calling within the Editor so it could potentially be defined as something else, like "G" for a gold standard.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #4 Reply With Quote
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 12th, 2017, 08:14 PM
Quote:
Originally Posted by zarlor View Post
Yeah, you may be totally right. I was reading that as defining the variable for monetary value rather than the symbol used but I can see where it could be part of defining "$". Not sure where "$" is inserted into that variable, mind you, but arguably wherever that is I would have though it could be left with a default value of "$" but maybe it could be available for calling within the Editor so it could potentially be defined as something else, like "G" for a gold standard.

Oh sorry... I guess it might make more sense if i had shown the actual procedure(note, there are two which are related):

Code:
  <!-- Procedure Money
        Format monetary values for appropriate display. The value to be formatted
        is passed in via the "moneyvalue" variable. The formatted string is returned
        in the "money" variable. If the money is an integral value, no decimals
        are appended. Otherwise, the value is rounded to two decimals and output
        with two decimals, so "$1.5" actually looks like "$1.50".

        Outbound parameter: money
        Inbound parameter:  moneyvalue
  -->
  <procedure id="Money" scripttype="none"><![CDATA[
    ~declare variables that are used to communicate with our caller
    var moneyvalue as number
    var money as string

    ~invoke the MoneyBare procedure to format the value
    call MoneyBare

    ~prepend a "$" on the value
    money = "$" & money
    ]]></procedure>

In essence, creating a variable named "currencysymbol". Then, the caller should be able to pass that in. You would the of course have to get the value from somewhere and I would suggest from the setting adjustment perhaps(or perhaps not, I don't know). In my suggestion, a second new parameter(optional) would be a filename, and if not present it would fallback to the currencysymbol.

I tried to make a copy of my game system file and remove stuff only loading the stuff in source, but I can't seem to get that working. I assume one would have to have a developer version of HeroLab OR perhaps I need to delete a few more files.
jfrazierjr is offline   #5 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old May 13th, 2017, 04:23 AM
Quote:
Originally Posted by jfrazierjr View Post
I tried to make a copy of my game system file and remove stuff only loading the stuff in source, but I can't seem to get that working. I assume one would have to have a developer version of HeroLab OR perhaps I need to delete a few more files.
I believe you'd just need the Authoring Kit and then you could clone out any game systems you own (so you could copy out Savage Worlds that way) and modify the source files in that version to your hearts content. Otherwise modifying those source files does nothing because those are just copies for review if needed. To some extent the Wiki was built using Savage Worlds as the same new system built out with the Hero Lab language so you can sort of, partially, follow along with what is what from there, but it's seriously out of date and it's not an open Wiki so user editing suggestions can't be done there, apparently, so even trying to help get it updated may take a bit of pushing on the Lone Wolf folks to have happen.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #6 Reply With Quote
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 18th, 2017, 07:12 AM
Quote:
Originally Posted by zarlor View Post
I believe you'd just need the Authoring Kit and then you could clone out any game systems you own (so you could copy out Savage Worlds that way) and modify the source files in that version to your hearts content. Otherwise modifying those source files does nothing because those are just copies for review if needed. To some extent the Wiki was built using Savage Worlds as the same new system built out with the Hero Lab language so you can sort of, partially, follow along with what is what from there, but it's seriously out of date and it's not an open Wiki so user editing suggestions can't be done there, apparently, so even trying to help get it updated may take a bit of pushing on the Lone Wolf folks to have happen.
I tried this, but it looks like a bust. The Authoring kit advances past the point where than is implemented in the baseline which is a bummer. On the good news end, I finally have a baseline(I somehow messed up my previous attempt and got it wrong) from which I can follow the old wiki tutorials and get a much better understanding of the data file structure and usage.
jfrazierjr is offline   #7 Reply With Quote
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old May 18th, 2017, 07:29 AM
Well, having REAL coders digging through things (and by REAL coders I'm meaning pretty much all of you that don't include me!) is always a plus, IMHO. I've done OK with building data files but anything that helps CC get some more improvements on the Savage Worlds side in Hero Lab is always a big plus in my book, so thanks for taking the time to dig into it. I know he gets swamped with the requests guys like me keep putting out there, but at least in my case I also don't have the know-how to give some solid coding examples of how to do those things, so I don't doubt some of the snippets you and others have been pointing out on that front are probably a big help for him, which in turn ends up being a big help for the rest of us.

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)
zarlor is offline   #8 Reply With Quote
jfrazierjr
Senior Member
 
Join Date: Aug 2013
Posts: 123

Old May 18th, 2017, 08:08 AM
Quote:
Originally Posted by zarlor View Post
Well, having REAL coders digging through things (and by REAL coders I'm meaning pretty much all of you that don't include me!) is always a plus, IMHO. I've done OK with building data files but anything that helps CC get some more improvements on the Savage Worlds side in Hero Lab is always a big plus in my book, so thanks for taking the time to dig into it. I know he gets swamped with the requests guys like me keep putting out there, but at least in my case I also don't have the know-how to give some solid coding examples of how to do those things, so I don't doubt some of the snippets you and others have been pointing out on that front are probably a big help for him, which in turn ends up being a big help for the rest of us.
NP. I have no doubts(well... very little) that we could have a user setting to change the "$" to anything else in the UI, though visual space may be an issue with more than 2-3 characters currency "sign"(not sure what the possible size limit would be, but there would be one.)

I am much less confidence that we could utilize an image, but in theory it's possible. There are other images attached to "records" such as the sort arrows on the special tab, etc so it may or may not be possible depending upon how it's implemented.
jfrazierjr is offline   #9 Reply With Quote
Paragon
Senior Member
 
Join Date: Feb 2010
Posts: 874

Old May 18th, 2017, 03:56 PM
Quote:
Originally Posted by zarlor View Post
Well, having REAL coders digging through things (and by REAL coders I'm meaning pretty much all of you that don't include me!)
If you think I'm more of a coder than you are, Zarlor, you haven't been paying attention.
Paragon is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:23 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.