Senior Member
Join Date: Aug 2013
Posts: 123
|
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 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. |
#1 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
Obivously that code doesn't deal with changing the monetary symbol used. But there is thread where CC responded:
Quote:
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) |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 123
|
Quote:
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. |
|
#3 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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) |
#4 |
Senior Member
Join Date: Aug 2013
Posts: 123
|
Quote:
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. |
|
#5 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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) |
#6 |
Senior Member
Join Date: Aug 2013
Posts: 123
|
Quote:
|
|
#7 |
Senior Member
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819
|
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) |
#8 |
Senior Member
Join Date: Aug 2013
Posts: 123
|
Quote:
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. |
|
#9 |
Senior Member
Join Date: Feb 2010
Posts: 874
|
|
#10 |
|
|