Completeness of the M.U.L.E. disassembly docs?

Talk about everything related to general reverse engineering of computer games!

Moderator: Kroah

Completeness of the M.U.L.E. disassembly docs?

Postby eobet » 02 May 2009, 16:51

I'm just wondering how complete the M.U.L.E. disassembly docs are, since the last 3rd of the currently published page is in french. :)

Also, if it isn't complete, are there any plans to update it?
eobet
 
Posts: 4
Joined: 08 Mar 2009, 20:54

Re: Completeness of the M.U.L.E. disassembly docs?

Postby Kroah » 06 May 2009, 12:25

Hello,

Somewhere in a previous post i've explained i lost the fully translated doc in a hdd crash.

I have no plan to update it in a near futur although i'll do it someday.

Do you need something especially?
Kroah
Site Admin
 
Posts: 430
Joined: 07 Feb 2006, 01:01
Location: France

Postby smurven » 08 May 2009, 22:09

I've been making mule in java for fun to try and learn to use a graphics library and found your disassembly of mule. One part in particular I didn't understand was the bit on determining store prices. I tried using google to translate it to english but either it didn't do a good enough job or I'm not understanding it regardless. any possibility of giving an example of it working? Since that is pretty much the most important aspect of the game (the economy) I really want to do it right. I just want to say while I'm writing this what a great job I think you've done.
smurven
 
Posts: 1
Joined: 08 May 2009, 22:03

store rough translation

Postby kilbaf » 17 May 2009, 18:49

Hi Smurven,

Well I have never played with mule but I guess it won't be far before I try it. I know from so long how good it is by press article.
I like a lot Kroah work and do by myself also some decompilation work.

Please feedback your source code and your web page on mule.

Here is a rough translation I have just done for you. I have not used spelling correctors and haven't read again the translation. So possible mistakes embedded. Also without knowing mule vocabulary I could be a little far at some time from the right word.

Do not hesitate to ask question. I guess Kroah will be better qualified to answer than me but I'll take a look. Other else the 6502 commented code is available. Oups, sorry it is in French. Well I suggest then to you to learn French it is a very nice language with a very good and rich litterature.

-------------------------------------------------------------------------------

The Store

1.
Goods price variation

Ces algorithmes sont utilisés pour calculer:
* le prix réel des biens
* le prix simulé et la qualité des biens pour l'AI (sélection de la terre et placement des exploitations)

Le prix réel des biens est mis à jour en effectuant:
* la variation du prix du Food
* la variation du prix de l'Energy
* la variation du prix du Smithore
* la variation du prix du Crystite

These algorithms are used to calculate :
* real price of goods
* simualte price and the quality of the goods for the AI (land selection and explotations placement)

The real price of goods is updated by doing:
* food price variation
* energy price variation
* smithore prive variation
* crystite price variation

1. Price variation with supply and demand

Entrées:

* le type du bien (Food, Energy ou Smithore/Mule)
* la quantité totale en jeu pour le round suivant (Food, Energy ou Mule
* la quantité totale requise pour le round suivant (Food, Energy ou Mule
* le prix courant (Food, Energy ou Smithore)
* le prix minimum (Food, Energy ou Smithore)

Inputs:
* good type (Food, Energy or Smithore/Mule)
* current(or maybe in the exchange only) total quantity for the next round (Food, Energy or Mule)
* total quantity needed for the next round (Food, Energy or Mule)
* current price (Food, Energy or Smithore)
* minimum price (Food, Energy or Smithore)

Sorties:

* le nouveau prix

Outputs:
* the new price

Le ratio de l'offre et la demande est calculé en divisant la quantité totale en jeu par la quantité totale requise. Un ratio supérieur à 1 indique que l'offre est insuffisante pour la demande. Un ratio inférieur à 1 indique que l'offre est supérieure à la demande.

Dans le cas du Smithore/Mule, le ratio est borné par ]0.25; 3.0].

Le nouveau prix est alors calculé avec la formule suivante:

prix = 25% * prix + 75% * (prix * ratio)

ou encore

prix *= 0.25 + 0.75 * ratio

Offer and demand ration is calculated by divided the current (or maybe in the exchange only) total quantity by the total quantity needed. A ratio >1 indicates that offer is not enough versus the demand. A ration <1 indicates that the offer is > to the demand.

In the case of Smithore/mule, the ratio is borned by excluded 0.25 to included 3.0.

price = 25% * price + 75% * (price * ratio) or price = 0.25 + 0.75 * ratio

Finalement, le prix est borné en fonction du bien et de la raison du calcul du prix (réel ou simulé pour l'AI):
Fianly, the price is borned according to the good and the reason of the price calculation (real or simulated for the AI):
Good Reason Minimum
Food Real 30
Energy Real 25
Smithore Real 50
Food Simulated (AI) 10
Energy Simulated (AI) 10
Smithore Simulated (AI) 50

#
Next round mules requirement

La quantité théorique de mules requise est calculée en sommant:

* le nombre de terrain libre susceptibles d'être prises au round suivant (plafonné par 4)
* le nombre de parcelles sans exploitation (et donc nécessitant une mule)

La valeur est bornée par [0; 8]

The theoric quantity of mules required is calculated by summing:
* the number of free land suceptible to be taken in the next round (maximum 4)
* the number of land without exploitation (and so which need a mule)

The theoric value is borned by [0;8]

#
Food price variation

Entrées:

* la quantité totale initiale en jeu
* la quantité possédée de chaque joueur
* la quantité produite de chaque joueur
* la quantité requise pour le round
* le prix courant
* le prix minimum

Inputs:
* initial total quantity in the game
* each player owned quantity
* each player produced quantity
* quantity needed for the round
* current price
* minimum price

Sorties:

* la quantité totale finale en jeu
* le nouveau prix

Outputs:
* total final quantity in the game
* new price

La quantité totale initiale en jeu est égale:

* pour le calcul du prix réel ou simulé (AI): à la quantité du store
* pour les prix simulés suivant (AI): à la quantité totale finale en jeu du calcul simulé précédent

The total initial quantity in the game is equal to:
* for the real or simulate (AI) calculated price: the quantity of the store
* for the next simulated prices (AI): to the current (or maybe the current exchange only) total final quantity of the previous simulated caculation

Dans un premier temps, on calcul le nombre d'unité totale qu'il y aura à la fin du round possédé par chaque joueur. On applique les 3 phases (Usage, Spoilage et Production):

* Usage (borné par 0): quantité possédée -= quantité requise
* Spoilage: quantité possédée *= 2/4
* Production: quantité possédée += quantité produite

In the first step, calculation of the total unity number that there will be at the eof the round owned by each player. Then calculation of the 3 phases (Usage, Spoilage and Production):
* Usage (borned by 0): quantity owned -= needed quantity
* Spoilage: owned quantity *=2/4
* Production: quantity owned += produced quantity

La quantité totale finale en jeu est alors calculée en sommant la quantité totale initiale en jeu et la quantité possédée par chaque joueur après les 3 phases.
The current (or maybe the current exchange only) final total quantity is then calculated by summing the initial total quantity in the game and the owned quantity by each player after the 3 phases.

Ensuite on calcul la quantité totale requise pour le round suivant (égale à la quantité requise pour le round suivant multiplié par 4)
Then the total needed quantity for the next round is calculated (equal to the required quantity for the next round * 4)

Finalement, on calcul le nouveau prix en appliquant la théorie de l'offre et de la demande avec comme paramètres:

* le type du bien (Food)
* la quantité totale finale en jeu pour le round suivant
* la quantité totale requise pour le round suivant
* le prix courant
* le prix minimum

Finaly, the new price is calculated by applying demand/offer theory with as parameters:
* good type (Food)
* current (or maybe the current exchange only) final total quantity for the next round
* total required quantity for the next round
* current price
* minimum price

La variation du prix du Food prend en compte le nombre d'unités possédées par les joueurs. Ainsi, tant que les joueurs en garderont une quantité suffisante, le prix du Food ne montera pas même si le store est en rupture.

The price variation of the Food takes into account the owned unities number by each playser. So as far as the players keep a sufficant quantity, the Food price won't increase even if the store is empty.

#
Energy price variation

Entrées:

* la quantité totale initiale en jeu
* la quantité possédée de chaque joueur
* la quantité produite de chaque joueur
* la quantité requise de chaque joueur pour le round
* le prix courant
* le prix minimum

Inputs:
* current (or maybe the current exchange only) initial total quantity
* owned quantity by each player
* produced quantity by each player
* needed quantity of each player for the round
* current price
* minimum price
Sorties:

* la quantité totale finale en jeu
* le nouveau prix

Outputs:
* current (or maybe the current exchange only) final total quantity
* new price

L'algorithme est identique à celui pour le Food, avec les différences suivantes:

* la quantité requise est propre à chaque joueur (et non dépendante du round)
* le Spoilage est de 3/4 (et non de 2/4)
* la quantité totale requise pour le round suivant égale à la somme des quantités requises de chaque joueur pour ce round + 4 (pour les futures exploitations)
* la fluctuation de l'offre et la demande est calculée pour le bien Energy

The algorithm is the same as the one for the Food, with the following differences:
* the needed quantity is specificic to each player (and not dependant of the round)
* the Spoilage is of 3/4 (and not of 2/4)
* the total needed quantity for the next round is equal to the sum of the needed quantity for each player of this round + 4 (for the the futurs exploitations)
* variation of the offer/demand is calculated for the Energy good

#
Smithore price variation

Entrées:

* la quantité de mules potentiellement disponible
* la quantité de mules requise pour le round
* le prix courant

Inputs:
* quantity of the potential available mules
* quantity of the needed mules for the round
* current price

Sorties:

* le nouveau prix

Outputs:
* the new price

La quantité de mules potentiellement disponibles est égale:

* pour le calcul du prix réel ou simulé (AI): à la quantité de mules dans le store plus la moitié du Smithore en store
* pour les prix simulés suivant (AI): à la quantité de mules potentiellement disponibles du calcul simulé précédent soustrait de la quantité de mules requise précédente (= 5)

The quantity of mules potientally available is equal to:
* for the real or simulated (AI) price calculation: mules quantity in the store + half the Smithore in the store
* for the next simulated (AI) prices: potentially availables mules fo the previous simulated calculation minus the previous needed mules quantity (=5)

La quantité de mules requise est égale:

* pour le calcul du prix réel: au calcul classique (calcMuleReq)
* pour le calcul du prix simulé (AI): à 5

The needed mules quantity is equal:
* for the real price calculation to the usual calculation (calcMuleReq)
* for the simulated (AI) price calculation: to 5

On applique la théorie de l'offre et de la demande avec comme paramètres:

* le type du bien (Smithore/Mule)
* la quantité de mules potentiellement disponibles
* la quantité de mules requise
* le prix courant du Smithore
* un prix minimum du Smithore égal à 50

The offer/demand theory is applied with as parameters:
* good type (Smithore/Mule)
* potentially available mules quantity
* needed mules quantity
* current price of the Smithore
* a Smithore minimum price equal to 50

Ensuite on applique la variation naturelle du Smithore si le niveau n'est pas Beginner. Pour cela on calcul la binomiale avec une amplitude 2 pour la valeur 0. Le résultat est multiplié par 7 et ajouté au prix. Ainsi on obtient les variations suivantes:
Then are applied the Smithore natural variation if the level is not beginner. For this "binomial" is calculated with for the value 0 a 2 amplitude. The result is multiplicated by 7 and add to the price. So here are the resulting variations:
Amplitude 2 (Factor 1)
Variation Probability
-28 0.013%
-21 0.562%
-14 6.248%
-7 24.303%
0 37.748%
+7 24.303%
+14 6.248%
+21 0.562%
+28 0.013%

Le prix est borné par 20.
The price is borned by 20.

Contrairement au prix du Food et de l'Energy, le prix du Smithore ne prend pas en compte les unités possédées par les joueurs, mais uniquement les unités dans le store et le nombre de mules disponibles. Ainsi, le prix grimpera dès que le store sera en rupture et/ou le nombre de mules sera insuffisant, et cela quelque soit le nombre d'unités possédées par les joueurs.

At the opposite of the Food and Energy price, the Smithore price doesn't take into account the owned unities from the players, but only the unities in the store and the available number of mules. This means, the price will increase as soon as the store will run out of and/or the number of mules will not be enought and this whatever is the number of unities owned by the players.

#

6.
Crystite price variation

Le prix du Crystite est égal à 50 additionné à un nombre alétaoire entre 0 et 99 (bornes incluses).
The Crystite prices is equal at 50 added to a random number between 0 and 99 (included minimum/maximum)

#
Purchase and sale price
Good Buy price Sell price Increment (per pixel)
Smithore Current price Buy price + 35$ 1$
Crystite Current price
(to bottom multiple of 4) Buy price + 140$ 4$
Food Current price - 15$ Buy price + 35$ 1$
Energy Current price - 15$ Buy price + 35$ 1$
kilbaf
 
Posts: 2
Joined: 17 May 2009, 18:36

Postby pedalpowered » 26 May 2009, 02:15

I randomly found the fully English translated MULE Decompilation document v.40. It's at http://bringerp.free.fr/RE/Mule/mule_document_en2.html.

I found it because I didn't understand the references to the "My document section" on the News page, not realizing that the "Decompilation" link would display the document being described (I figured it would be the disassembled snapshot -- I'd recommend changing references to "My document" to "Decompilation"). Then I noticed this thread in the forum, pretty good timing! If only I was a couple weeks earlier!

I want to thank Kroah for such amazing work. I'm astounded at the detail in these decompilations!

BTW, I would be very interested in your Java MULE project. I am remaking Ultima I-V in Java myself (have an unfiinished, but playable version of Ultima I already).

Admin edit: added the URL tag.
pedalpowered
 
Posts: 3
Joined: 26 May 2009, 01:44
Location: Vermont, USA

Postby Kroah » 01 Jun 2009, 23:45

Welcome smurven, kilbaf and pedalpowered,

The fully translated document has been done with a translator. I was not satisfied by the result so i did not put it online.

I'm actually working on it again. I have to remove it temporarily from the website because it's not compatible with the new layout. I will certainly use some parts of the Kilbaf translation.

I'll post here when it will be done.

See you soon.
Kroah
Site Admin
 
Posts: 430
Joined: 07 Feb 2006, 01:01
Location: France

Re: Completeness of the M.U.L.E. disassembly docs?

Postby pedalpowered » 08 Jul 2013, 18:04

Any chance it's done yet? I'd love to read it! Getting into MULE heavily again.
pedalpowered
 
Posts: 3
Joined: 26 May 2009, 01:44
Location: Vermont, USA

Re: Completeness of the M.U.L.E. disassembly docs?

Postby Kroah » 08 Jul 2013, 21:55

pedalpowered wrote:Any chance it's done yet? I'd love to read it! Getting into MULE heavily again.

I don't have time to do it "Yet", even if i would hope so.
To say the truth, the next release of CoCoNet is ready since April, and i can't find a moment to package it...
Kroah
Site Admin
 
Posts: 430
Joined: 07 Feb 2006, 01:01
Location: France


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron