[Released] Currency - Australian Doller

Discuss, get help with, or post new modifications, graphics or related tools for Locomotion in this forum.

Moderator: Locomotion Moderators

Post Reply
crosshair
Engineer
Engineer
Posts: 10
Joined: 28 Oct 2004 14:12

[Released] Currency - Australian Doller

Post by crosshair »

At the moment, i am working on getting the Australian Doller currency into Lomo.

Currently i have everything ready and am testing to see if it works.

I am unshure as to if anyone has attempted this before and if anything has been put into the WIKI. I am also unshure how to use WIKI yet but here is what i have figured out.

In CURRDOLL.xml (made from CURRDOLL.dat) there are 2 variables

Code: Select all

<variable name="zeroes" size="1">0</variable>
<variable name="shiftnum" size="1">1</variable>
Variable 'zeroes' is how many more zero's in the currency than the Pound
Variable 'shiftnum' is how many times to multiply the pound by 2

For example, The very first (begginner) scenario has a starting cash of 19,900 Pounds. Setting the currency to US Dollar changes the starting cash to 39,800.

Thus the numbers for the US Dollar are 0 and 1 which means
(in an excel formula)
=IF(zeroes=0,19900*2*shiftnum,19900*2*shiftnum*(10^zeroes))

The 19,900 Pounds turns into 39,800 US Dollars
I am sure that is correct.

Now what i am trying to do is convert the Pounds to AUD (Australian Doller)

To do this, i am going by an educated guess of the australian exchange rates to US dollars of AUD $0.72 = US $1.0

My problem at the moment is that the variable datatype i think may be an integer, but i need a double or a float.

This will be the variables for the AUD

Code: Select all

<variable name="zeroes" size="1">0</variable>
	<variable name="shiftnum" size="1">0.72</variable>
What i am trying to do now is changing the size of shiftnum to 4 (which is how many charactors have been used (perhaps 3 numbers if it looks for that) and this is the part i need help with if it does not work the way i am hoping it will.

Currently having the size of shiftnum at 1, it sees it as a 0 (zero) and converts the currency to the UK pound because that is what currency is given when 0 and 0 are used in the variables.

Thanks, need any more info please ask.
Last edited by crosshair on 03 Nov 2004 02:08, edited 1 time in total.
User avatar
ajy170
Transport Coordinator
Transport Coordinator
Posts: 270
Joined: 03 Oct 2004 08:25
Location: Australia

Post by ajy170 »

The doller is worth more then us 0.72, last time i checked (which was frisday morning which = close on thursday) the doller was at us 0.75, which is a good point to set it at since it is allways jumping up and down. But it's great to see some Australian stuff getting put into this great game :D
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

You say (since you go for Excel formulae, I'll go with TeX):

$ f(x) = x\times{}(10^zeroes)\times{}(2\times{}shiftnum) $

Surely it should be:

$ f(x) = x\times{}(10^zeroes)*(2^shiftnum) $?
crosshair
Engineer
Engineer
Posts: 10
Joined: 28 Oct 2004 14:12

Post by crosshair »

I am sure i have gone about it all wrong. Lets start from the begining. All money in Loco (and TTD and TTO) are worked off the UK Pound. I dont know the going rate for the UK Pound, i will look for it, but if so, the Australian Doller will be more than the US Doller, not less as i have been gonig about it.

I am working off the values i gave in my first post, 19,900 Pounds (UK), $39,800 (US) and $28,656 (AUD - Which is wrong). It needs to be ~$55,000.

Therefore, using the number 0.72 in the calculation is wrong, a new number for making ~$55,000 needs to be used.

1.38887 is this number, but the problem still stands, that the variable cannot have a decimal number.

Code: Select all

<variable name="zeroes" size="1">0</variable> 
<variable name="shiftnum" size="1">1.38887</variable>
Any help will be appreciated.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

Hmm... think laterally about this.

You want something in the region of £1 =A$3. Now, you can't reach that using powers of 10 and 2. However, you might be able to do £10=A$32. zeroes=-1, shiftnum=5.
User avatar
ajy170
Transport Coordinator
Transport Coordinator
Posts: 270
Joined: 03 Oct 2004 08:25
Location: Australia

Post by ajy170 »

1 aus doller goes for around 0.4332 british cents. Stop short changing the Austrlian doller like it is worth nothing!!!!!!!!!!!!!!!!!!!!!!!!!
crosshair
Engineer
Engineer
Posts: 10
Joined: 28 Oct 2004 14:12

Post by crosshair »

negative numbers dont work :(
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

ajy170 wrote:1 aus doller goes for around 0.4332 british cents.
British whats?
User avatar
orudge
Administrator
Administrator
Posts: 25214
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

From here...

Live mid-market rates as of 2004.11.01 15:27:55 GMT

1.00 GBP = 2.45276 AUD


That's the official rate as of now, now go and implement it. ;)
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

1, It's dollar, with an a.
2, It's pounds anyway until 1966. :)

The difference in game terms between the USD and the AUD is negligable; it's not even as if you're trading between currencies, all the different currencies do is change the symbols displayed.
crosshair
Engineer
Engineer
Posts: 10
Joined: 28 Oct 2004 14:12

Post by crosshair »

*note* uhg... silly cat... walked over my keyboard and hit F5 (deliberatly :P)

Ok, I have implimented it :P. But as i said before, Loco does not like decimal numbers, so i have used the exchange rate (shiftnum) as 2 which makes the money the same as deuchmark (did i spell it wright?).

get hit here CURRAUD.dat

Nothing further will be added unless a major breakthrough in datatypes occurs :P

Thanks to those who help (and those who complained about the exchange rate :P)
User avatar
ajy170
Transport Coordinator
Transport Coordinator
Posts: 270
Joined: 03 Oct 2004 08:25
Location: Australia

Post by ajy170 »

It's not downloading for me:(.Firefox just sits there, and IE says the page does not exsist.
crosshair
Engineer
Engineer
Posts: 10
Joined: 28 Oct 2004 14:12

Post by crosshair »

Server must be down :(

Ok, temporary site at -

CURRAUD.dat

Enjoy :!:
Post Reply

Return to “Locomotion Graphics, Modifications & Tools”

Who is online

Users browsing this forum: No registered users and 9 guests