Steve Jackson Games Forums getting the integer of a value.
 Register FAQ Calendar Search Today's Posts Mark Forums Read

04-19-2017, 01:22 PM   #1
flyingwombat

Join Date: Aug 2004
Location: Alameda, CA
getting the integer of a value.

I have been trying to add the light mod from Tailoring and Style from UT175. I have been able to get the changes in cost, weight, and dr. I can't get the integer of the DR. I tried this
Quote:
 @fix(*2/3 to owner::baseweight), @fix(*2/3 to owner::dr)
and
Quote:
 @int(*2/3 to owner::baseweight), @int*(2/3 to owner::dr)
Help.
__________________
Fraser: "Could you elucidate, sir?"
Welsh: "No, no. Not since the late sixties."
Ray: "That's Canadian for explain." --- from "due South" episode Seeing Is Believing

 04-19-2017, 06:28 PM #2 ericbsmith     Join Date: Aug 2004 Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle. Re: getting the integer of a value. The "to owner::tag" needs to be outside of the maths. Try this: gives(-@int(owner::dr/3) to owner::dr) gives(-@int(0.4999 + owner::dr/3) to owner::dr) The first will take 1/3 the DR, drop fractions, then subtract it from the DR. The second will take 1/3 the DR, round up, then add it to DR. So DR 5 will result in -1 DR in the first formula but -2 DR using the second. DR 6 will result in -2 DR using either formula. __________________ Eric B. Smith GURPS Data File Coordinator GURPSLand The future keeps telling us what the past was about. You make the past mean different things by what you do with the time that comes after.
 04-21-2017, 11:20 AM #3 flyingwombat MIB     Join Date: Aug 2004 Location: Alameda, CA Re: getting the integer of a value. I couldn't get either formula to work. Thanks __________________ Fraser: "Could you elucidate, sir?" Welsh: "No, no. Not since the late sixties." Ray: "That's Canadian for explain." --- from "due South" episode Seeing Is Believing
 04-22-2017, 10:25 AM #4 ericbsmith     Join Date: Aug 2004 Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle. Re: getting the integer of a value. The biggest problem here is that it will work with simple DR values, such as DR6, but not complex ones like 12/4*. GCA can read dr(6) as a numeric value and calculate from it; it cannot read dr(12/4*) as being numeric, so does nothing instead. GCA can do math to complex DR values like 12/4*, but it isn't very smart about it. Applying a gives(*2/3 to owner::dr) results in floating point errors creaping in as well as no integer rounding of DR values. Unfortunately, I don't think that GCA is capable of applying that modifier correctly, at least not automatically. __________________ Eric B. Smith GURPS Data File Coordinator GURPSLand The future keeps telling us what the past was about. You make the past mean different things by what you do with the time that comes after.
 04-22-2017, 08:49 PM #5 ericbsmith     Join Date: Aug 2004 Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle. Re: getting the integer of a value. ...but I do have an idea of how to handle this is the same basic way that the Build-Your-Own armor from Low-Tech is handled. EDIT: And I've now uploaded an updated Ultra-Tech data file to my website for your testing. http://gurpsland.no-ip.org/GCA4/Ultra-Tech.zip __________________ Eric B. Smith GURPS Data File Coordinator GURPSLand The future keeps telling us what the past was about. You make the past mean different things by what you do with the time that comes after. Last edited by ericbsmith; 04-22-2017 at 09:51 PM.
 04-23-2017, 05:16 PM #6 flyingwombat MIB     Join Date: Aug 2004 Location: Alameda, CA Re: getting the integer of a value. Just downloaded it. Thanks __________________ Fraser: "Could you elucidate, sir?" Welsh: "No, no. Not since the late sixties." Ray: "That's Canadian for explain." --- from "due South" episode Seeing Is Believing
 05-12-2017, 12:26 AM #7 flyingwombat MIB     Join Date: Aug 2004 Location: Alameda, CA Re: getting the integer of a value. I created a sheer set of armor. using the build it tools. It covered the character's front. The armor won't show up character sheet. I can't even apply it. __________________ Fraser: "Could you elucidate, sir?" Welsh: "No, no. Not since the late sixties." Ray: "That's Canadian for explain." --- from "due South" episode Seeing Is Believing
 05-12-2017, 01:16 AM #8 ericbsmith     Join Date: Aug 2004 Location: Binghamton, NY, USA. Near the river Styx in the 5th Circle. Re: getting the integer of a value. I have no issue applying the armors in the Protection Window -> Apply Armors dialog boxes. The issue I have (which is unreconsiable right now) is that GCA does not currently recognize all of the funky hit locations which the Build-Your-Own Armor rules allow you to create. "Torso" is recognized as a hit location; "Front Torso" is not. GCA5 begins to address this, in that it can properly track all those funky hit locations. However, the UI and display of that information still needs some polishing work. __________________ Eric B. Smith GURPS Data File Coordinator GURPSLand The future keeps telling us what the past was about. You make the past mean different things by what you do with the time that comes after. Last edited by ericbsmith; 05-12-2017 at 11:03 PM.
 05-12-2017, 11:09 AM #9 flyingwombat MIB     Join Date: Aug 2004 Location: Alameda, CA Re: getting the integer of a value. For now I will make a note of funky armor on the character sheet. __________________ Fraser: "Could you elucidate, sir?" Welsh: "No, no. Not since the late sixties." Ray: "That's Canadian for explain." --- from "due South" episode Seeing Is Believing

 Thread Tools Display Modes Linear Mode

 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 Fnords are Off [IMG] code is Off HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Illuminati Headquarters     SJ Games Discussion     Daily Illuminator     Forum Feedback and Help     MIB Demo Events Warehouse 23     Warehouse 23 General Discussion     Warehouse 23 Digital     Pyramid Munchkin     Munchkin 101     Munchkin     Munchkin Collectible Card Game     Munchkin Quest     Other Munchkin Games Roleplaying     Dungeon Fantasy Roleplaying Game         DFRPG Resources     GURPS         GURPS Resources     Transhuman Space     Traveller     The Fantasy Trip     In Nomine     Roleplaying in General     Play By Post Board and Card Games     Car Wars     Illuminati Playtest     Ogre and G.E.V.         Ogre Video Game         Ogre Scenarios     Board and Dice Games     Card Games     Miniatures The Network     GURPS Character Assistant     GURPS Vehicle Builder     GURPS Character Builder The Gnomes of Zurich     The Industry     Conventions     Trading Post     Gamer Finder

All times are GMT -6. The time now is 06:40 AM.