[Depricated] Trumble Treats - coming soon!
Moderators: winston, another_commander
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
lol
Hmm. I got pretty confused with all the fuss about those random numbers, having missed half the argument.
I don't get the point of having not truly random numbers then.
If I'd want a fixed random number, I'd store a true random number in a variable...
So I'd better use Math.random() then... *sigh*
I replaced all my initial instances of that for the SaltyQRN, because I thought it was the new standard. :p
oh well.
I'll be offline for a few hours. Haveta tile my GF's bathroom floor. maybe I'll get some time later.
Hmm. I got pretty confused with all the fuss about those random numbers, having missed half the argument.
I don't get the point of having not truly random numbers then.
If I'd want a fixed random number, I'd store a true random number in a variable...
So I'd better use Math.random() then... *sigh*
I replaced all my initial instances of that for the SaltyQRN, because I thought it was the new standard. :p
oh well.
I'll be offline for a few hours. Haveta tile my GF's bathroom floor. maybe I'll get some time later.
Riding the Rocket!
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
The thing is, in the old days computers didnt have enough memory to store the whole of elite, so a system was used to generate everything.
It would not be good to have the first system called AAAAA and the second AAAAB, and so on, so a "random" sequence was developed. It cannot really be random though as you want the system to have the same names each time you play the game (or even just look at the system on the chart).
It would not be good to have the first system called AAAAA and the second AAAAB, and so on, so a "random" sequence was developed. It cannot really be random though as you want the system to have the same names each time you play the game (or even just look at the system on the chart).
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
yeh! That is one of the charms of elite.
In principle, by changing a single seed number, a whole galaxy could be changed. Even could get naughty system names! Also more isolated pockets though. (Not so big a problem for OOlite anymore though)
I forget the term for it all the time, but it sorta means "content generated on the fly".
Might be a funny easteregg tweak : ultra-non-conservative-mode:
randomise the seeds for totally un-traditional universes. . . maybe barring the first.
In principle, by changing a single seed number, a whole galaxy could be changed. Even could get naughty system names! Also more isolated pockets though. (Not so big a problem for OOlite anymore though)
I forget the term for it all the time, but it sorta means "content generated on the fly".
Might be a funny easteregg tweak : ultra-non-conservative-mode:
randomise the seeds for totally un-traditional universes. . . maybe barring the first.
Riding the Rocket!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
“Procedural generation”. And yes, that’s what scrambledPseudoRandomNumber(), pseudoRandomNumber(), and indeed the legacy pseudoFixedD100_number and pseudoFixedD256_number are for.Arexack_Heretic wrote:I forget the term for it all the time, but it sorta means "content generated on the fly".
E-mail: [email protected]
- Cmd. Cheyd
- ---- E L I T E ----
- Posts: 934
- Joined: Tue Dec 16, 2008 2:52 pm
- Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...
scrambledPseudoRandomNumber
Where is documentation on this one?
Where is documentation on this one?
Find my OXP's at:
Deep Horizon Industries - Your Planet Our Design
Deep Horizon Industries - Your Planet Our Design
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
in generalCmd. Cheyd wrote:scrambledPseudoRandomNumber
Where is documentation on this one?
and:
this specifically salty.
--
edit: ps laying tile is a bitch! being logicalminded like me, the GF measured and cut all the odd bits in advance, assuming the areas were square. As I could have told her, from experience of hanging shelves in her closet, her appartment only looks square, in fact all the wall joins are more than slightly off 90degrees!
Now I understand why the previous tenants just put a bit of linoleum in there. Did only a metre or so and everything hurts. :poor me:
Riding the Rocket!
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
new 0.01 versioon in op.
added wiki-page in feature-OXPs.
Edit: but it doesn't show up in the indexpages....
here is the link to the page.
added wiki-page in feature-OXPs.
Edit: but it doesn't show up in the indexpages....
here is the link to the page.
Riding the Rocket!
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Okay. Only one person downloaded so far...
Anyhow, got down to creating a new jameson and playing a bit for testing.
resorted to practicing docking to get the trumble offer.
Once I had the trumble, I saved and noticed that the texture of the MkIII that rotates in the savescreen is now replaced by the trumble template.
(white with grey fur and evil eyes)
I wanted an animated trumble shader, but this is not it.
I have in OXPs:
wrex-cargopods 1.6.2
griff debris sets135 NNM
griffs shipset by dizzy
hotrods
nukes 0.97
shady cobra
YAH A-F
trumbleTreats_v001
Obviously a shader error, I suspect the shady cobra oxp.
As for the testing: I find that the box-o-trumble is not removed from the equipment complement and thus it is impossible to buy more than one box at a time. Unfortunately the mission variable is updated at the same time as removing the EQ, so the script will not go further from here.
This is the relevant bit of code:
Anyhow, got down to creating a new jameson and playing a bit for testing.
resorted to practicing docking to get the trumble offer.
Once I had the trumble, I saved and noticed that the texture of the MkIII that rotates in the savescreen is now replaced by the trumble template.
(white with grey fur and evil eyes)
I wanted an animated trumble shader, but this is not it.
I have in OXPs:
wrex-cargopods 1.6.2
griff debris sets135 NNM
griffs shipset by dizzy
hotrods
nukes 0.97
shady cobra
YAH A-F
trumbleTreats_v001
Obviously a shader error, I suspect the shady cobra oxp.
As for the testing: I find that the box-o-trumble is not removed from the equipment complement and thus it is impossible to buy more than one box at a time. Unfortunately the mission variable is updated at the same time as removing the EQ, so the script will not go further from here.
This is the relevant bit of code:
Code: Select all
// When equipment is bought and turns out to be a box, it is removed and the mV updated.
this.playerBoughtEquipment = function(equipment)
{
if (PlayerShip.hasEquipment === "EQ_TRUMBLE_BOXED")
{
PlayerShip.removeEquipment("EQ_TRUMBLE_BOXED");
missionVariables.trumbleboxes_number += 1;
}
};
Riding the Rocket!
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
No, it's just that your code is rubbish.Arexack_Heretic wrote:Unfortunately the mission variable is updated at the same time as removing the EQ, so the script will not go further from here.
First, the syntax is player.ship.foo, not PlayerShip.foo.
Second, hasEquipment isn't even used anymore, and if it were used, the === wouldn't make any sense. It would be a method, not a property, so the correct syntax would be hasEquipment("EQ_FOO").
But anyway, we're not using hasEquipment anymore for testing for equipment. Note that it has been removed from the relevant Wiki pages. Instead we use equipmentStatus, and the correct way to test is to compare it to "EQUIPMENT_OK". So, if you would even want to go this way, the test would be if (player.ship.equipmentStatus("EQ_TRUMBLE_BOXED") === "EQUIPMENT_OK").
However, and third, that's not what you actually want to test for. The only thing you need to know is whether the equipment just bought is a trumble box. So what you want to test is whether the returned equipment parameter equals EQ_TRUMBLE_BOXED.
So this is what the relevant bit of code should look like:
Code: Select all
// When equipment is bought and turns out to be a box, it is removed and the mV updated.
this.playerBoughtEquipment = function(equipment)
{
if (equipment === "EQ_TRUMBLE_BOXED")
{
player.ship.removeEquipment("EQ_TRUMBLE_BOXED");
missionVariables.trumbleboxes_number += 1;
}
};
Last edited by Commander McLane on Wed Jul 28, 2010 2:07 pm, edited 1 time in total.
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Yeah, I'm used to that.Commander McLane wrote:it's just that your code is rubbish
Was just about to investigate the methods of that bit in more detail, but you beat me to it.
I must have written this in pseudocode mixed with legacy methods half remembered.
hasEquipment is still used as an example here though.
edit: argh! syntax errors ! :p
(<= != =<)
so...
why does this not register as a function? :
this.AH_trumbleTimer= new Timer(this, this.AH_fryTrumbles(), 0 ,5);
this.AH_fryTrumbles = function()
{lots of stuff};
too tired now...sleepy.
Last edited by Arexack_Heretic on Wed Jul 28, 2010 3:16 am, edited 1 time in total.
Riding the Rocket!
- CheeseRedux
- ---- E L I T E ----
- Posts: 827
- Joined: Fri Oct 02, 2009 6:50 pm
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
hah! That is weird, my computer clock is fine.CheeseRedux wrote:Say, A_H, am I having an ocular malfunction, or is your computer's clock off by a month?
Oolite is so retro it lives a month ago.
found numerous typos and such, uploading 0.02.
Still dysfunctional, but shows recent code.
Riding the Rocket!
- CheeseRedux
- ---- E L I T E ----
- Posts: 827
- Joined: Fri Oct 02, 2009 6:50 pm
Ah, of course, that's it. It's the build date or whatnot.
Mine says Sep 22 2009. (Yes, I still haven't installed 1.74. Downloaded, but not installed.)
That's what I get for never using anything but fullscreen.
Mine says Sep 22 2009. (Yes, I still haven't installed 1.74. Downloaded, but not installed.)
That's what I get for never using anything but fullscreen.
"Actually this is a common misconception... I do *not* in fact have a lot of time on my hands at all! I just have a very very very very bad sense of priorities."
--Dean C Engelhardt
--Dean C Engelhardt
You uploaded a new version a few minutes after I d/led the other one.
If you want a delay before launching the player you can use the closures (like typecasting in C):
If you want a delay before launching the player you can use the closures (like typecasting in C):
Which is just awful and ugly syntax, but it works.var trumbleLaunchTimer = new Timer(this, function(){
if(PlayerShip.docked) PlayerShip.launch();
}, delay, interval);
You're missing a bracket in the test. It should beCommander McLane wrote:But anyway, we're not using hasEquipment anymore for testing for equipment. Note that it has been removed from the relevant Wiki pages. Instead we use equipmentStatus, and the correct way to test is to compare it to "EQUIPMENT_OK". So, if you would even want to go this way, the test would be if (player.ship.equipmentStatus("EQ_TRUMBLE_BOXED" === "EQUIPMENT_OK").
Code: Select all
if(player.ship.equipmentStatus("EQ_TRUMBLE_BOXED") === "EQUIPMENT_OK")
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link