Jump to content


  • Content Count

  • Joined

  • Last visited

About Thelric

  • Rank
  • Birthday April 30

Contact Methods

  • AIM
  • MSN
  • Website URL
  • ICQ
  • Yahoo
  • Skype

Profile Information

  • Location
    Ottawa, Canada

Recent Profile Visitors

555 profile views
  1. There are probably several ways. Using code similar to the above, you can draw anything you want on a component face. You could play with the settings and probably get something like what you want. For example, you could change the template image setting for the item style card to the use the same image as the title and body style card, and change the text region to cover the whole card instead of just the bottom half. Note that when changing the template image, you typically need to set the setting, save the component, close it, and reopen it before the image changes. Though that might not be the case for the misc small since the template image changes dynamically when you change the card style anyway.
  2. If I understand your question, you don't need to do anything complicated. When drawing the component, first draw the portrait. Then draw the template image overtop. The template image should have a transparent hole cut out of it in the area where you want the portrait to appear. So the portrait will show through where the hole appears. In most cases, that's all you need to do. In the Plug-in Authoring Kit, check the DIY Examples/Three or More Faces. Specifically, the example in script resources/example/3-face-diy.js. Cheers, Chris
  3. It does work, it just doesn't force the component to be repainted right away so you won't see the change until the next time the component is modified normally. Adding the line Editor.redrawPreview(); to the end of the script will redraw the component immediately so the change is picked up right away. The message that is printed is not an error message (script errors are shown in a different colour). When you run a script in the Quickscript window, it prints the final value of the script (as if the script were evaluated as an expression... yeah, its a bit technical I'm afraid.) When the script consists of multiple lines, its value as an expression is the value of the last thing to be executed, which is the last line, the one that assigns a value to $on-paint. It turns out that when assignment is evaluated as an expression, the value of that expression is the value that is being assigned, which is the source code of the onPaint function. You might be wondering what the point of printing the expression is. It is a useful shortcut for getting information. For example, you can type the name of any variable, run the script, and find out the variable's value (or more specifically its string representation). Or you can use the Quickscript window like a calculator by running an arithmetic expression: running 1+1 would print 2.0. Cheers, Chris
  4. You could adapt the code four posts up to do so. Cheers, Chris
  5. Arkanian, I replied to your message some time ago but haven't heard back. I need an email address to send a small plug-in file to. If you are still around, check your messages and reply with an address. Cheers, Chris
  6. Sorry, didn't notice this earlier. If you haven't already done so, update to the most recent build, which fixes this problem. Cheers, Chris
  7. The Deck menu was greyed out because you were not editing a deck. New decks are created like any other kind of component: File|New, then select the category Card Decks and Game Boards and the Deck of Cards component type. Now you have a new deck; continue with the instructions above. (Although it isn't entirely clear from your question that you want to Export the finished deck.) By the way, as an alternative to laying out the deck yourself, you can create a New Project, add a Deck of Cards task to it, copy the .eon files you want to include in the task folder (or create them there), and then right click on the task folder and choose Make Deck. Then select the paper size and other options you want and click the Make Deck button. Strange Eons will do all the layout work for you and save the result in the file you specified. Tip: If you want to include any of the files in your deck more than once, open the copies file that appears in the task folder. Drag-and-drop a file you want multiple copies of into the copies file editor, and then type the number of copies to include (if more than two). Cheers, Chris
  8. Yes. It isn't as simple as changing a stat name, though. What you'd do is set, say, Stamina to 3 and then paint the Sanity value yourself. To do that, you'd change the existing Sanity region so that it is completely off the card (by setting it to say, -200,-200,100,100). Then add an "on paint handler" to the component that draws your replacement Sanity value in the same location as the original. This is a bit of script code that you assign to the setting on-paint. When this setting exists on a component, every time a face gets painted the script code in this setting will be parsed and the onPaint function it defines will be called to customize the way the face is painted. useSettings( Component ); // move the standard sanity value off the card face $sanity-region = '-200,-200,100,100'; // set this to the standard location of the sanity value; // this controls where we will paint our value, and should // the standard location ever change we can fix our component // by updating this setting $fixed-sanity-region = '447,261,73,30'; // this function will draw the new sanity value function onPaint( g, gc, sheet ) { var font, region; // this is called for every sheet (card face); we need to make // sure that we are dealing with the front face since that // is the only one we want to modify if( sheet != gc.sheets[0] ) return; useSettings( gc ); g.setPaint( new Colour( $ah-black-colour ) ); region = new Region( $fixed-sanity-region ); font = resources.ArkhamFonts.monoTitleFont; sheet.drawTitle( g, '3', region, font, $sanity-pointsize, 0 ); } // we use the toSource() function to get the above function // definition as a string of script text, and assign that to // the component's on-paint setting; the default painting // mechanism looks for this setting, executes the script it // contains, and calls its onPaint function each time one // of the component's sheets (faces, sides) needs to be redrawn $on-paint = onPaint.toSource(); Cheers, Chris
  9. Here are a few general ways to do this sort of thing: Method 1 You can use the Quickscript window, as you've apparently been doing. If you have a recent build of Strange Eons, then there are a couple of new features to be aware of: First, you don't have to translate "-" to "_" in setting key names anymore. So instead of "$lore_text" you can just write "$lore-text". Second, I've started some work on a code completion facility. For JavaScript code this is still very much a work-in-progress, but code completion for setting keys works pretty well already. Example: Open a new investigator; check Variable under Stamina/Sanity. Open the Quickscript plug-in window (from the Toolbox menu). If there is already some script code in the window, delete it (Ctrl+A, then Delete) or comment it out if you want to keep it for later (Ctrl+A, Ctrl+/). On an empty line, make sure that the $ notation you are about to use will refer to the currently edited component by inserting the line "useSettings( Component );" On a new line, type $ and the first letter or two or what you guess the key name might be (such as "$max"). Press the code completion command key (Ctrl+Space) or select it from the Source menu. A list of possible completions appears, if there are any. Look for the setting key that matches what you expect, such as "$max-sta-text". Use the up/down cursor keys to select that option in the list, and press Space or Enter to select it. In the script, the rest of the key name will be completed for you. Finish the line of code, typically with something like " = 'some alternate text';". Add a line that will force the card to be redrawn with the new setting value: "Editor.redrawPreview();". Run the script. Method 2 If you want to do this sort of thing a lot, it will be worth your time to learn to use the developer tools plug-in. It has a searchable table that matches against both keys and values (that is, you can search for the text you want to change, such as "LORE"). Example: Open a new investigator; check Variable under Stamina/Sanity. Open the Setting Explorer plug-in (in the Toolbox menu), make sure that the source is "Private settings" and, at the bottom. set "Parent settings to list" to "Immediate Parent Only". Now it will only show the custom changes you make and defaults for Arkham Horror. In the "Regex setting filter" field, just above the "Parent settings to list", type some of the text you want to change. In this case, just start typing "MAX" It will be enough just to type the "M" and the "A". Note that the filter is case sensitive. (And because it is a regex---that is, regular expression filter, it also recognizes some characters as special. For example "." matches any single character.) You can now see from the filtered-down table that the key names are "max-san-text" and "max-sta-text", respectively. You can edit them directly in the explorer by double clicking the current value in the Value column of the table (such as "MAX. SANITY"). Cheers, Chris
  10. Just an FYI for anyone who picks up this project. This is why you can set a version number on the component. For example, diy.version = 1; diy.version = 2, and so on. Whenever you add new features that won't be in old save files, increase the version number. Then, add some code to the onRead function that checks the version number and, if it is an older version, creates default values for the new features. For example: function create( diy ) { diy.version = 3; // the current version } function onRead( diy, objectInputStream ) { if( diy.version < 2 ) { $newFeatureAddedInVersion2 = 'default value for this feature'; } if( diy.version < 3 ) { $firstNewFeatureAddedInVersion3 = 'the default for this feature'; $secondNewFeatureAddedInVersion3 = 'and the default for this one'; // since we added defaults for all the new stuff, this card is now // version 3 (the current version); if we don't change this, then // the default values will keep getting set when the file is opened diy.version = 3; } }
  11. The SE markup language doesn't generally use named attributes. In the image tag, the first number after the image location will be the width. If you leave off the height, it will be calculated from the image's aspect ratio. Also, the width and height take a unit: one of pt (points), cm, or in (inches). If you don't specify a unit, you'll get cm. You might find it easier to use Markup|Image, since this will generate the tag text for you. Further reference Cheers, Chris
  12. Very much so. On a scale in which 1 is a board game and 10 is a role-playing game, you'd have something like Arkham Horror=2, Mansions of Madness=3, Arkham Investigations=5, and Call of Cthulhu=10. http://arkhaminvestigations.barkingdoginteractive.com/ Cheers, Chris
  13. Raven1015 said: Still has the bug on Macs where formatting (bold, italic, underline) doesn't work. Not sure if that can be fixed or not. If you mean the issue where on Macs fonts included with a plug-in don't get made into a family properly, so applying bold/italic doesn't use the bold/italic versions of the font (that are also included in the plug-in): Based on my testing, that has been resolved since the build of SE that switched from requiring Java 6 to the one requiring Java 7. I think it was the one released around the start of April. The problem was due to a bug in Apple's implementation of Java 6. I reported it to them, but nothing ever happened with it. (As is typically the case with Apple, there is no way to know if anyone even looked at it, let alone tried to fix it.) With Java 7, Apple's font library isn't being used anymore, so the problem solved itself. This was actually one of the main reasons I decided to require Java 7. If you mean some other problem with bold/italic, I'm not sure what you mean. You'll have to provide more information. By the way, over the last couple of months a lot of OS X-specific issues have been resolved. If you haven't updated SE3 lately, it'd be a good idea to do so. If in doubt about whether to bother updating, you can check the Twitter feed (@StrangeEons) to get a quick summary of the most important changes. There are usually 1 or 2 updates a month. Cheers, Chris
  14. Jake yet again said: I'm trying to update a few old cards but the image resources file doesn't seem to point to the correct location in SE 3642. anybody know where the following can be found: 1. - The curly divider line 2. - The magnifying glass icon Thanks Tip: in the portrait panel's file field (or the Insert Image file field), Shift+click the folder icon to open a chooser for built-in resources instead of the file chooser. A few versions back I organized the icons into categories and deleted some old ones that haven't been used for several versions. There are several hundred icons in there and many of them had names that were no longer an accurate reflection of how they were used. After six years, it really needed a cleanup. The divider, which is used in the about dialog, has been moved to icons/application. However, the style of the divider has changed and it might no longer be suitable for what you were using it for. Moving/changing the divider seems to have caused some trouble for a few people, and I am strongly considering restoring the old divider image at the original location (while keeping the modified divided at the new location). There are three versions of the magnifying glass icon, icons/ui/find.png (16 px), icons/ui/find-sm.png (11 px), and icons/ui/find-lr.png (64 px). Cheers, Chris
  15. That's strange. If it works with the standard expansions, it should work with any expansion. Did you create the expansion symbol plug-in using Expansion|New?
  • Create New...