View unanswered posts | View active topics It is currently Thu Mar 28, 2024 3:24 am



Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
 EP's Fig & Shield Price Script? 
Author Message
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post EP's Fig & Shield Price Script?
I was doing a search for some information and stumbled across a post in Gameplay Q&A about fig & shield pricing. I saw where EP had figured out the formula for calculating hold, fig and shield pricing. By the way, sweet piece of work there by EP :D

I downloaded the spreadsheet he did, so I can track fig & shield pricing with that. But I saw where he had posted that he would be putting the script on Grimy's but we all know that isn't there. I downloaded the EP script pack from Helix's post, but it wasn't in there.

I saw his sine script but with my limited knowledge of math there's no way I could include that in a script I write and even know how to set the script up, let alone do the cosine math in there that (if I remember correctly) the post talked about needing to be done after you did the sine work.

Like I said, I have the spreadsheet so I can use that, just thought it would be pretty cool to have the actual script.

If not, maybe a bit of an explanation of how you would set up a script to use his sine include? Thanks


Thu Mar 29, 2012 4:45 am
Profile
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: EP's Fig & Shield Price Script?
I wonder if that spreadsheet needs updated now that JP changed how TW displays the year. Humm....

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Thu Mar 29, 2012 7:13 am
Profile ICQ WWW
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3554
Location: Long Beach, CA
Unread post Re: EP's Fig & Shield Price Script?
SteveH_66 wrote:
I was doing a search for some information and stumbled across a post in Gameplay Q&A about fig & shield pricing. I saw where EP had figured out the formula for calculating hold, fig and shield pricing. By the way, sweet piece of work there by EP :D

Look here, its in the ep script pack download/file.php?id=647

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Lest we forget
I had to ask myself WWSGD?


Thu Mar 29, 2012 7:55 am
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Thanks Helix. :) I saw the zipfile with sin.ts and FindSin.ts, I ran sin.ts and it asked me for the degree, I put in 10 and it gave me what I assume is the sine for 10 degrees. I checked the code of the other files in the script pack with Context, none of them seem to be a file that would give you hold, fig and shield prices.

I already had the EP script pack, but I downloaded the one you put in the link in your reply and it seems to be the same as the one I had already downloaded from the link in your other post of scripts you have.


Thu Mar 29, 2012 8:21 am
Profile
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Cruncher wrote:
I wonder if that spreadsheet needs updated now that JP changed how TW displays the year. Humm....


Cruncher, I think you may be right. I pulled up the spreadsheet and it's showing that fig prices should be 223.0234784 for today, and shield prices should be 126.9765216 for today.

In my local game, it's showing fig prices at 234 and shield prices at 115. Hmmm.


Thu Mar 29, 2012 8:34 am
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: EP's Fig & Shield Price Script?
That's just great, thanks alot JP, you broke my script :P

Off the top of my head, there's probably an offset that needs to be applied. JP didn't likely change the formula, but rather the games "TODAY" no longer lines up with today according to how the original did. In theory, you can determine the offset between the old ingame date and the new ingame date, apply that, and it should match back up.

Oh, and thanks, that was a great thread and a great moment where I finally cracked that formula. I even put it in my signature!

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Thu Mar 29, 2012 7:22 pm
Profile WWW
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1837
Location: Guam USA
Unread post Re: EP's Fig & Shield Price Script?
I have not looked at the code yet .. but if its based on todays date ..


The old way would change ActualYearLim + "12"
The new way would change ActualYearLim + "28"

hope this helps ..

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Thu Mar 29, 2012 7:59 pm
Profile WWW
Ambassador
User avatar

Joined: Fri Feb 23, 2001 3:00 am
Posts: 4016
Location: USA
Unread post Re: EP's Fig & Shield Price Script?
ElderProphet wrote:
That's just great, thanks alot JP, you broke my script :P

Off the top of my head, there's probably an offset that needs to be applied. JP didn't likely change the formula, but rather the games "TODAY" no longer lines up with today according to how the original did. In theory, you can determine the offset between the old ingame date and the new ingame date, apply that, and it should match back up.

Oh, and thanks, that was a great thread and a great moment where I finally cracked that formula. I even put it in my signature!

+EP+


Naw, blame Vid, he's the one who asked for the change. ;)

_________________

BOTE 1998 Champs: Team Fament
HHT 2015 Champs: Cloud09
Big Game 2016 Champs: Draft team
HHT 2018 Champs: Rock Stars
Big Game 2019 Champs: Draft Team


Classic Style Games Here:
telnet://crunchers-twgs.com:2002

Web page from 1990's: https://web.archive.org/web/20170103155645/http://tradewars.fament.com/Cruncher/tradewar.htm
Blog with current server info: http://cruncherstw.blogspot.com
Discord: https://discord.gg/4dja5Z8
E-mail: Cruncherstw@gmail.com
FaceBook: http://www.facebook.com/CrunchersTW


Thu Mar 29, 2012 10:45 pm
Profile ICQ WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Does anyone know what the old ingame date was, and what the new ingame date is? I did a check on my local server and it's showing my time and date as "07:19:20 AM Mon Aug 17, 2043" which is odd since my system time is 5:19 pm local time, on my computer, and as you can see in this post today is Oct 14th. Wonder if my server isn't keeping the time right.

I need the old ingame date so I can try to mod EP's hold, fig & shield spreadsheet. I'm wondering if JP did some other mods to how the server handles time/date? Might mean needing to figure this whole thing out again.

Edit:
Would try to do up a script using EP's sin.ts script as an include, but since I don't know if JP used 365 or some other number for the number of days in the year, would be hard to convert from what was it (dec 31, 1900?) to the current ingame date so that you could feed the sin script that number. If I'm even guessing right as to how the sin.ts script works.


Wed Oct 14, 2015 5:30 pm
Profile
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1837
Location: Guam USA
Unread post Re: EP's Fig & Shield Price Script?
TWGS is always using 365 day calendar except on leap years.

I I posted earlier (a couple yrs ago in this post)

The cal would be on Julian day of the year and the year
for v1 = Actual Year + 12
for v2 = Actual YearLim + 28

or you might consider what I have done ,
check once a day in game (CR1*qq)
for prices on terra port and record them.

Then with another command 'prices'
echo them or send results over sub-space comms.

ex.

Attachment:
Prices.JPG
Prices.JPG [ 34.17 KiB | Viewed 15743 times ]



Vid Kid

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Thu Oct 15, 2015 12:29 am
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Thanks Vid, appreciate the answer on that one. I didn't understand what you were saying in your earlier post a while back, the term you used sounded like an Excel function or something, and I use Libre Office and didn't see a similar term for it in there. Or was there once a script floating around out there that used EP's sin script to get the prices?

And yes, I could check the price every day doing a port report on Terra, I just totally spaced that one it's been so long since I played the game much. I was thinking the spreadsheet or a script, so as not to have to burn turns going over there. I got started in a turn limited with low turns, so I'm kind of stingy with them.

And having that spreadsheet or a script for it makes it kind of nice being able to plan ahead for big purchases you know? I'm sure just doing it like you showed in a text file would let you get a general ballpark idea on what they would be in the future though. Besides, you got to admit, that was some sweet work EP did figuring that one out and it would be kind of cool having the spreadsheet working. :lol:


Thu Oct 15, 2015 3:10 am
Profile
Commander

Joined: Sun Feb 25, 2001 3:00 am
Posts: 1837
Location: Guam USA
Unread post Re: EP's Fig & Shield Price Script?
I have this mechanism built into my login script.
Like I said , when I come into game , or IF I stay online .. I must lay one fighter in MSL so feds remove it at extern .. then the script will type
CR1^MQ and gather the info into a file (once a day only).

I have seen a spreadsheet version of it for forecasting by a
choosing a day date and year.

But no longer have that one.

Since I will only need this info as I play games , I find the method I use acceptable for either version of server I'm on.

Vid

_________________
TWGS V2 Vids World on Guam Port 2002
Telnet://vkworld.ddns.net:2002
Discord @ DiverDave#8374
Vid's World Discord

Founding Member -=[Team Kraaken]=- Ka Pla

Image
Winners of Gridwars 2010
MBN Fall Tournament 2011 winners Team Kraaken
Undisputed Champions of 2019 HHT Just for showing up!

The Oldist , Longist Running , Orginal Registered Owner of a TWGS server :
Vids World On Guam


Thu Oct 15, 2015 7:53 am
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Yes, that sounds like a pretty good solution for game-play Vid. A good simple solution that works well, and it would get the job done most of the time. I just came across the thread where EP solved the thing while I was doing research about something, and it kind of caught my interest, and I remembered that I had downloaded that spreadsheet of his and used it sometimes.

So it was mostly just something that caught my eye and got my interest, kind of one of those "ya I remember that from back in the day" kind of things you know.


Fri Oct 16, 2015 2:28 am
Profile
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1131
Location: Augusta, GA
Unread post Re: EP's Fig & Shield Price Script?
I haven't checked, but I assume updating the Excel spreadsheet should be easy. Do you need me to look into it?

Regarding a script to do it, it's a bit of a pain due to the time conversions, and the sine/cosine functions. I may have some provision for time conversions and sine/cosine in 2.05.73, but if so, it's not well tested.

I'll check that and provide an update.

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Thu Oct 22, 2015 10:25 pm
Profile WWW
Ensign

Joined: Wed Nov 06, 2002 3:00 am
Posts: 268
Unread post Re: EP's Fig & Shield Price Script?
Thanks EP, I would appreciate it if you could check into updating the spreadsheet. I have tried it on my own but I can't figure out where to make the changes in the formula. I'm not that familiar with formulas in spreadsheets in general, and Excel in particular. I have a copy of Excel, but I usually work in LibreOffice Calc since the Excel sheets usually work fine in Calc.

Although the Excel sheet may not work just right in Calc in this case, I'm not sure if they handle that turn of the century date the same, I think in your other thread where you solved the fig price problem you said Excel uses 00:00:00 on Dec 31, 1900 and if I remember right from the help file for Calc, it uses 12/30/1899 as the 'Date Base for Day Zero'. Don't even know if that applies with your spreadsheet and makes a difference between Excel and Calc, like I said I'm not that great with spreadsheets beyond fairly simple stuff.

I tried getting the difference in number of days between 'Day Zero' in the new TWGS Version 2 and replacing the number of days you had in the spreadsheet from TWGS Version 1 with that, but it didn't work for me. But I was using Calc for it instead of Excel and the different way they handle 'Day Zero' might have been messing things up. Like I said, not that great with math or spreadsheets :lol:

A script would be cool, I thought about making one but I got a bit confused. Like you said, you would have to figure out the date and time conversions and then figure out how to integrate the sine/cosine stuff which I'm not very familiar with. It wouldn't be hard to call the sin.ts script as an include from another script and pass it the date/time conversions I wouldn't think.

If you did make provisions for it in 2.05.73, they aren't documented in the script command help file. So you would have to do up an explanation here in the forum on the undocumented commands. And like you said, you would have to test to make sure that they work well if you did put in the provisions, which is a lot of work to ask you to go through.

The spreadsheet worked well, and that would be just fine for most needs I would think. Anyway, I would greatly appreciate it if you could take another look at the spreadsheet when you catch a chance. Thanks


Sat Oct 24, 2015 4:14 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.