Microsoft Research: Detours library
-
Quite funny though MS releasing a hooking library
yeah, i had same thought when i got it ;D
I’m using it in some of my progs, works just fine, very simple to use if you aren’t PE-file–format genius
The only issue that i’ve read about is when you’re rewriting code that executes right now in othe thread. Never run into it though
edit:
Ah, and another one: with this lib you’re hooking any calls to function, not like with IAT hook, when you get hooks only from module you patched.
I.e.: if you install detour on some function in kernel32.dll, which is shared in memory for all processes in system, you’ll be redirected to your detour when any app calls hooked function
This is usually even more convenient than IAT hook, but keep this fact in mind. -
Did it work - the real economy thingy? I’ve seen references hanging around the archives but no hard links and it all happened prior to my involvement around here. A dynamic economy system is on my list to do - one day - after about 10 (okay about 20) other things.
-
He posted a video of his efforts at one point. His dynamic economy seemed to update in real-time, that is you could see prices fluctuating as you bought cargo in the commodity trader.
-
Personally I don’t understand why Flhook isn’t used for a dynamic economy, it wouldn’t be that difficult would it? for every item of something that is brought and where, Flhook could consult a database and add a tax, depending on buying, selling, amount etcetc.
-
If it’s so easy, just go ahead and do it
Remember it has to have stellar performance so it can cope with 100 players buying stuff at the same time.
-
It was a question if it was easy or not ;), if I had any skill with programming I would potentially try it, but I can’t, I was mearly suggesting ideas for other people who might know how to do such a thing ;D
-
I think it has to do with challenge and variety. You need to stay up-to-date about the latest developments in the economy and what’s good now might not be as much in a week, which introduces new trade routes and more possibilities. If you follow the economy well, you might be able to discover a particular commodity which hasn’t been used much and whose prices have skyrocketed and make a big buck before anyone else does. You may also be able to lobby the economy for RP purposes or to get more money out of it.
If you wonder why a dynamic economy might be interesting, wonder why people like being in stock markets
-
A simple dyanamic economy would be relatively easy, but the price adjustment algorithm, although not that hard to implement, requires a lot of thought to get right.
There are at least three ways to implement the charging system.
1. Flhook just charges more or less for particular commodities but doesn’t show the correct buy/sell prices on the commodities screen. This is easy.
2. Adjust the prices shown to the player on the commodities screen in near real-time. This involves some client side modifications. This is a little harder.
3. Auto-updater that downloads new prices when the player connects to the server. Depending on how it is done, it could be easy or hard. -
I have never yet had anyone explain why a dynamic economy is so desirable.
Lets carry some stuff but we won’t know how much it sells for at the other end doesn’t seem too logical, but I am willing to be educated.
Ok, let’s put it into realworld terms. How often do you go down the supermarket to find the price of bread has gone up? What the hell you pay it anyway. Next time you go down to the supermarket, there’s a sale on, bread has been reduced by a certain amount, happy days. The same wih petrol prices or any other realworld item, the prices fluctuate. That’s what a dynamic economy is all about, subtle differences in supply and demand for a particular item. FLAC has this and it works really well. Lastly, let’s not forget dynamic economies have been in space sims for years, ever since Elite. Freelancer is an exception to the rule.
-
Why real world terms it is a game Do we really play games to imitate life?
However, even in a vanilla sized mod it would be impossible to keep up with changes of that magnitude on that time scale. Hence I still can not see the need for a instantaneously dynamic variable economy.
Why use all that finesse when many mods use autoupdaters. With these prices can be changed on a timescale realistic to the playing = dynamic market.
The stock market is just gambling and do they really work at building stable economies?
Do players really want that?
Most balanced economies I have seen are never used, players look for the milk runs and follow those. And moan like hell if they suddenly find the last update has changed them. Next stage is frustration as they want to play not live on the game.
I still content real time dynamic economies are too unrealistic, players need slower changes so they can explore and map on a game scale. Not relearn everything each time they log on.
And if Freelancers economy is anachronistic is that related to it’s longevity, it is a good sim game. Completely unrealistic in most respects but that doesn’t spoil the fun.
-
Why use all that finesse when many mods use autoupdaters. With these prices can be changed on a timescale realistic to the playing = dynamic market.
The stock market is just gambling and do they really work at building stable economies?
Do players really want that?
It’s a case of horses for courses. Yes, many mods use autoupdaters to do the dynamic economy thing. I personally find this irritating which is why i prefer the way that FLAC does things. All serverside with no need for the player to do anything. The FLAC method relies on supply and demand which makes for a much more realistic experience.
No such thing as a stable economy, agree there, but if a lot of people trade a certain commodity to the same place, expect the price to go down.
My players like it for the reasons i’ve already stated, makes for a little twist when you land, did you make as much as you thought or did you get a bonus and make that little bit extra? No different than trading in the RW.
I appreciate dynamic economies are not for everyone, but i think the way it’s handled with how FLAC does it is excellent, and just adds a bit of spice to the trudge that is trading