Jump to content

keira

Global Moderator
  • Posts

    3,425
  • Joined

  • Last visited

Everything posted by keira

  1. The data will be exposed as such (I'm using Adrift as an example here): In each CSR review, there will be a chunk of HTML embedded in it, as such: <span data-csr-composite="eyJ0aXRsZSI6IkFkcmlmdCIsInRpZCI6MTIzMDcsInRhZ3MiOlsiYXZlcm51bSB1bml2ZXJzZSIsImJlZ2lubmVyIiwiY29tYmF0IGhlYXZ5Iiwic2hvcnQiXSwiYmdhc3AiOnsiNSI6MSwiNCI6MTMsIjMiOjIsIjIiOjAsIjEiOjB9fQ==" id="csr-composite"> Composite Score: ... </span> The data-csr-composite attribute contains encoded machine-readable data on the scenario. You can use a CSS selector to grab that information, and send it to a parser. Using QueryPath (which is basically jQuery for PHP), the following code will grab it: <?php $data = htmlqp($html, '#csr-composite')->attr("data-csr-composite"); This data is essentially a JSON object encoded using base64. You can decode it using the following PHP string: <?php $array = json_decode(base64_decode($data), true); The JSON string will look something like the following (note that I am still developing the script to generate this, but it may change slightly as I (possibly) add more metadata about the scenario): { "title": "Adrift", "tid": 12307, "tags": [ "avernum universe", "beginner", "combat heavy", "short" ], "bgasp": { "5": 1, "4": 13, "3": 2, "2": 0, "1": 0 } } Note that 'bgasp' is the abbreviation for the actual scenario stats. They are described in detail in this source config file. Basically, 5=best, 4=good, and so on down the line. So, your solution will be to put this little function somewhere: <?php // let's call this decode.php require 'qp.php'; // Assuming QueryPath is somewhere in INCLUDE_PATH. May need to adjust. /** * NOTE: This function doesn't do much in the way of error handling. Will probably cause drama. **/ function getPost($tid) { $url = "http://spiderwebforums.ipbhost.com/index.php?/topic/$tid-/"; $html = file_get_contents($url); $data = htmlqp($html, '#csr-composite')->attr("data-csr-composite"); return json_decode(base64_decode($data), true); } // getPost Then, once you've done that, you just need to simply include the following in each review page: <?php require '/path/to/decode.php'; $i = getPost(12307); ?> <!-- html stuff here, yada yada --> Best: <?php echo $i['bgasp']['5']; ?> <!-- yada yada --> Of course, with this data you can do a lot of stuff, look at this code:83 for a quick generator to list the "Composite Score" section
  2. Okay, i'm just going to go ahead and lock this topic since it's veered into a place it should not have veered, and shows no signs of returning.
  3. fyi: i'm working on a new system for the scenario reviews that will make that ratings tab on the right a lot easier on your end. on a design side i feel like having a tiny fixed-width detracts from it somewhat. I feel kind of silly scrolling an overflow:auto div when i have so much screen space that is just "the color purple". personal prefs though.
  4. Its fine for me if i have the full day off, but if i have work that morning then i'll end up being a bit late. Of course ive been putting pto days in lately so...
  5. call off i mean its something that needs to be solved in the long term if you're going to keep working there, but if you aren't up to it right now then you'd be better off delaying it. i dunno
  6. keira

    Daylight Savings

    all time should be measured in UTC. this isn't the damn stone ages, we are a global society and one clock is enough. just wait until we go to space and we have multiple planets. christ
  7. Theres a crappy IPB app but it reportedly sucks. Havent used it However, the mobile version of the site is pretty slick. The only features i find missing are mod things, so...yeah. Try it out, see what you think
  8. When I am playing an RPG, i usually tend to play as relatively good characters, since in those cases I'm nearly always emulating how I'd (or at least how i'd like to) respond in that situation. However, if it's some sort of table-top RPG, I do tend to lean on the side of morally questionable. Simply put, it's telling a story, and what sort of story has every character play as a saint? It makes no sense
  9. keira

    Bundle?

    I'm not sure there's iCloud support, but it looks like you can copy them over manually, though.
  10. Bekora Tiquo Human Mechanic XP: 26 (Advancement 5) Wounds: 0 Fatigue: 0 Power Points: 10/10 [spoileralt=Skills and Derivatives] Agility: d8 Smarts: d10 Spirit: d4 Strength: d4 Vigor: d4 Investigation: d10 Knowledge (Engineering): d10 Knowledge (Geography): d8 Notice: d8 Repair: d10 Riding: d8 Shooting: d8 Spellcasting: d10 Streetwise: d6 Parry: 2 Toughness: 4 Charisma: +0 Pace: 5 Arcane Background (Magic): 10 PP, 3 powers MacGyver: May improvise temporary gadgets Scholar: +2 to two different Knowledge skills Steady Hands: Ignore unstable platform penalty; Running penalty reduced to -1 Gadgeteer: Once per session, can create Weird Science object from spare parts Elderly: Pace –1, –1 to Strength and Vigor die types; +5 skill points for any skill linked to Smarts Loyal: Bekora tries to never betray or disappoint her friends Stubborn: Bekora always wants her way [/spoileralt] [spoileralt=Gear] Horse Crowbar Hammer 20 yards of rope Iron spikes (10) Shortbow Quiver Barbed arrows (20) [/spoileralt] [spoileralt=Spells] [spoileralt=Chain Lightning (custom power, based loosely on Bolt)] Rank: Novice Power Points: 3 Range: 12/24/48 (+special) Duration: Instant Trappings: Electrical arc An electric current originates from the caster and passes through a series of enemies. A normal success hits two targets, which must be within 4 units of each other; each raise adds another target, which must be within 4 units of the previous target. All targets take 2d6 damage, and Chain Lightning ignores up to 2 points of Armour. [/spoileralt] [spoileralt=Summon Elemental (Summon Ally)] Rank: Novice Power Points: 3+ Range: Smarts Duration: 3 (1 PP/round maintenance after duration expires) Trappings: Creates an elemental servant under the control of the caster. [spoileralt=Lightning Spirit (Seasoned-rank lightning elemental)] Attributes: Agility d12, Smarts d4, Spirit d8, Strength d6, Vigor d6 Pace: 8, Parry: 7, Toughness: 5 Skills: Fighting d8, Shooting d6 Special Abilities Elemental: Having no discernible body parts, the lightning spirit normally suffers no additional damage from called shots. It is also immune to fear, intimidation, disease and poison. Assault and Battery: The lightning spirit can batter itself against enemies to shock them. Treat this as a natural weapon inflicting Str+d4 damage with 1 point of armour piercing. Anything that strikes the spirit with an unarmed attack, makes a successful grapple attempt, or otherwise touches it with an unprotected body part also automatically takes damage as if struck by this attack. Capacitance: The lightning spirit is animated by electrical energy. A very powerful shock can short it out, but lesser currents only energise it. It effectively has Improved Arcane Resistance against electrical attacks (+4 Toughness and +4 bonus to opposed rolls). In addition, any electrical damage that fails to inflict at least a Shaken result on the elemental will cause it to recover from Shaken status if it was already Shaken. Chain Lightning: With a successful Shooting roll, the lightning spirit can launch a ranged attack equivalent to the Chain Lightning spell.[/spoileralt] [spoileralt=Lightning Wisp (Novice Rank lightning elemental)] Attributes: Agility d12, Smarts d4, Spirit d8, Strength d4, Vigor d4 Pace: 10, Parry: 6(+2), Toughness: 4 Skills: Fighting d8 Special Abilities Elemental: Having no discernible body parts, the lightning wisp normally suffers no additional damage from called shots. It is also immune to fear, intimidation, disease and poison. Assault and Battery: The lightning wisp can batter itself against enemies to shock them. Treat this as a natural weapon inflicting Str+d4 damage. Anything that strikes the wisp with an unarmed attack, makes a successful grapple attempt, or otherwise touches it with an unprotected body part also automatically takes damage as if struck by this attack. Hover: The lightning wisp levitates several feet above surfaces and is therefore unaffected by most terrain. It can also hover across any gap that it can cover in a single turn's movement. Capacitance: The lightning wisp is animated by electrical energy. A very powerful shock can short it out, but lesser currents only energise it. It effectively has Improved Arcane Resistance against electrical attacks (+4 Toughness and +4 bonus to opposed rolls). In addition, any electrical damage that fails to inflict at least a Shaken result on the elemental will cause it to recover from Shaken status if it was already Shaken. Small (Size -2): The lightning wisp is a pulsating orb that grows no more than one foot in diameter. All attacks against it suffer a -2 penalty, giving it an effective Parry of 8 against melee attacks and meaning that missile attacks must roll a 6 or better to hit at short range. [/spoileralt] [/spoileralt] [spoileralt=Charge (Smite, modified with increased range and PP cost)] Rank: Novice Power Points: 3 per target Range: Smarts Duration: 3 (1 PP/round maintenance after duration expires) Trappings: Charges a weapon with electricity Increases the target weapon's damage by +2, or +4 with a raise. May affect up to five targets. [/spoileralt] [/spoileralt]
  11. I don't think there's an actual list (there probably should be), but item abilities and (for weapons) damage types are listed in the code in classes/consts.h. See here for a pretty decent listing (lines 505-665 are a relevant list). edit: i'm a lying poohead, it actually is listed in the Items appendix.
  12. keira

    Jeff's editors

    this so much when i program something for myself, it's full of vulnerabilities and bugs. I know not to do certain things because i know how i do and don't sanitize the input. When publishing a program publicly, you have to assume any input will either 1) be dangerous and possibly trying to exploit your vulnerabilities, or 2) be incompetently input and therefore prone to cause errors with the program assumes it's correct. For example, my stalkers will know that I am working on a CSR parser. I have to write code that can reliably handle when someone rates something that falls out of predetermined values. see link. Unfortunately closing "assumptive" code and fixing vulnerabilities takes a lot of time and effort.
  13. seriously why doesnt everyone do this i thought that was a common thing
  14. Here's a rough documentation for that node, I'll make sure it gets properly documented. that was effectively copy-pasted from the glorious 2009 commit message where the code was introduced. Extra 2B is a bit weird, but I'll try and clarify it from looking at the code: - ex2b = 1: The max value from all the PCs. - ex2b = 2: The average (mean) of all the PCs. - ex2b = 3: The min value from all the PCs. - ex2b = 4: The sum of all the PCs' values. Note: If an individual PC is selected for the node (presumably via Split Party?) then it ignores ex2b and just pulls that PC's specific value. If your party isn't Split, you can just set ex2b to 10 and I think it'll get the value for the currently selected PC (as in, the blue italics one?) Hope this helps
  15. what does the error dialog say
  16. Older SW games have the data stored as binary into a .dat file, with some stuff hard-coded iirc. However, the newer games also use an avernumscript-like format for some things. The game then acts like a scripting engine, loading the scripts as it needs to and compiling them to bytecode in real-time. This is how most script languages (Python, PHP, prolly perl, etc) work.
  17. keira

    Artemis

    This one at 39:34 is where IT BEGINS.
  18. Oh my. I get the same error. It appears that Jewels has another download that works though, from the archived version of Alcritas's website. See if this works.
  19. Boop! You can find all known BoE scenarios archived on that website.
  20. i suppose at some point i should make my alignment something other than "human" eh
  21. Bekora Tiquo Human Mechanic XP: 20 (Advancement 4) Wounds: 0 Fatigue: 0 Power Points: 10/10 [spoileralt=Skills and Derivatives] Agility: d8 Smarts: d10 Spirit: d4 Strength: d4 Vigor: d4 Investigation: d10 Knowledge (Engineering): d10 Knowledge (Geography): d8 Notice: d8 Repair: d10 Riding: d8 Shooting: d8 Spellcasting: d10 (+4) Streetwise: d6 Parry: 2 Toughness: 4 Charisma: +0 Pace: 5 Arcane Background (Magic): 10 PP, 3 powers MacGyver: May improvise temporary gadgets Scholar: +2 to two different Knowledge skills Steady Hands: Ignore unstable platform penalty; Running penalty reduced to -1 Elderly: Pace –1, –1 to Strength and Vigor die types; +5 skill points for any skill linked to Smarts Loyal: Bekora tries to never betray or disappoint her friends Stubborn: Bekora always wants her way [/spoileralt] [spoileralt=Gear] Horse Crowbar Hammer 20 yards of rope Iron spikes (10) Shortbow Quiver Barbed arrows (15) [/spoileralt] [spoileralt=Spells] [spoileralt=Chain Lightning (custom power, based loosely on Bolt)] Rank: Novice Power Points: 3 Range: 12/24/48 (+special) Duration: Instant Trappings: Electrical arc An electric current originates from the caster and passes through a series of enemies. A normal success hits two targets, which must be within 4 units of each other; each raise adds another target, which must be within 4 units of the previous target. All targets take 2d6 damage, and Chain Lightning ignores up to 2 points of Armour. [/spoileralt] [spoileralt=Summon Elemental (Summon Ally)] Rank: Novice Power Points: 3+ Range: Smarts Duration: 3 (1 PP/round maintenance after duration expires) Trappings: Creates an elemental servant under the control of the caster. [spoileralt=Lightning Wisp (Novice Rank lightning elemental)] Attributes: Agility d12, Smarts d4, Spirit d8, Strength d4, Vigor d4 Pace: 10, Parry: 6(+2), Toughness: 4 Skills: Fighting d8 Special Abilities Elemental: Having no discernible body parts, the lightning wisp normally suffers no additional damage from called shots. It is also immune to fear, intimidation, disease and poison. Assault and Battery: The lightning wisp can batter itself against enemies to shock them. Treat this as a natural weapon inflicting Str+d4 damage. Anything that strikes the wisp with an unarmed attack, makes a successful grapple attempt, or otherwise touches it with an unprotected body part also automatically takes damage as if struck by this attack. Hover: The lightning wisp levitates several feet above surfaces and is therefore unaffected by most terrain. It can also hover across any gap that it can cover in a single turn's movement. Capacitance: The lightning wisp is animated by electrical energy. A very powerful shock can short it out, but lesser currents only energise it. It effectively has Improved Arcane Resistance against electrical attacks (+4 Toughness and +4 bonus to opposed rolls). In addition, any electrical damage that fails to inflict at least a Shaken result on the elemental will cause it to recover from Shaken status if it was already Shaken. Small (Size -2): The lightning wisp is a pulsating orb that grows no more than one foot in diameter. All attacks against it suffer a -2 penalty, giving it an effective Parry of 8 against melee attacks and meaning that missile attacks must roll a 6 or better to hit at short range. [/spoileralt] [/spoileralt] [spoileralt=Charge (Smite, modified with increased range and PP cost)] Rank: Novice Power Points: 3 per target Range: Smarts Duration: 3 (1 PP/round maintenance after duration expires) Trappings: Charges a weapon with electricity Increases the target weapon's damage by +2, or +4 with a raise. May affect up to five targets. [/spoileralt] [/spoileralt]
×
×
  • Create New...