Author
|
Topic: New Mod: Mega Mod for 0.7.0 and UQM-HD (Read 16237 times)
|
Jugger
Frungy champion
Offline
Gender:
Posts: 64
|
I'm curious about it. Good luck!
By the way, an info and a hint about the new heap size:
At the moment I collected almost all valuable minerals of the galaxy from rare earth (green) on upwards plus some noble gas (blue), the size of the save game is now at about 25 KB. Insofar it's okay for me, but if someone grabs a lot of less valuable minerals too, then I'm afraid that the heap could run short. You must bear in mind that there're still large amounts of base metals and corrosives left, which might increase the heap usage to more than 30 KB, when collected. Thus I'd recommend to increase the heap size a little bit more to about 40 or 50 KB, just as a precaution.
|
|
|
Logged
|
|
|
|
Krulle
Enlightened
Offline
Gender:
Posts: 1115
*Hurghi*! Krulle is *spitting* again!
|
Now how to make it so they don't turn on you when you get the helix, maybe they give it to you?
I think, that would be a good idea.Correction: It might be easier to let the player get the helix by himself from the planet as normal, and then add one more conditional expression in the part of the code, where the Thraddash turn against you, so they won't become hostile. Something like this pseudocode: if (helix_retrieved and not allied) then turn_hostile end
...where the "and not allied" is the additional condition. Otherwise, when you want the Thraddash to give away the helix, you must also modify the database by adding new text and speech ( "fiddling with addon content"), the last might be beyond your means or too extensive. I thought the Thraddash guard the planet until you're allied or sent them off to fight the enemy of their masters. Having an ally steal something that valuable is soemthing I definitely see as a reason to become hostile. Having a non-allied power steal an important artifact is also something I consider sufficient reason to become hostile.
Logically, I would prefer an "ask for the Helix as a gift" if you have bought the information from the Melnorme that you'll need the Helix to repair the Ultron. And if you're allied, that will work without the Thraddash becoming hostile. If adding further conversation-tree elements is out of the question, simplify to stealing then not being problematic. So, I would amend the "code" to:
FUNCTION hostile:BOOLEAN: //Thraddash hostile or not IF (helix_retrieved AND (NOT Helix-Infor_Melnorme) THEN hostile=TRUE; //whether allied or not: there was no reason for you to steal that thing. ELSE hostile=FALSE //not retrieved: no reason for hostilities; helix_retrieved AND Helix-Infor_Melnorme = you were able to explain it away, even if there is no conversation tree for that available. end;
This way, to get the advantage of further being allied you'll need to spend resources with the Melnorme. An acceptable trade-off IMHO. (Back then I actually tried if I could make this happen.) The continued alliance is then not a free gift.
|
|
|
Logged
|
|
|
|
JHGuitarFreak
Enlightened
Offline
Posts: 1374
|
Well there is a scenario where the Thraddash let you down onto the planet willingly, if you are allied of course. Normally they become hostile once you come back up.
I'm fiddling with the code to make sure that the only time you can ever grab the Helix and not piss them off is if they are not fighting the Kohr-Ah, not fighting the Ilwrath, you are allied, and they let you on the planet willingly. With the caveat that if the Kohr-Ah wipe the Thraddash out then none of this matters. So basically, don't try to steal it when the Thraddash are on mission and everything will be fine.
EDIT:
Fiddling is almost done, looks like everything works out perfectly so far If the Thraddash are fighting the Ilwrath and you take the Helix, they stop being allies. Before or after you can talk your way down to the planet and they will still be allies if you take the Helix.
EDIT: An addendum to the Thraddash thing: The Thraddash now die out if you decide to take the Helix from them during their battle with the Ilwrath
I'm curious about it. Good luck! By the way, an info and a hint about the new heap size: At the moment I collected almost all valuable minerals of the galaxy from rare earth (green) on upwards plus some noble gas (blue), the size of the save game is now at about 25 KB. Insofar it's okay for me, but if someone grabs a lot of less valuable minerals too, then I'm afraid that the heap could run short. You must bear in mind that there're still large amounts of base metals and corrosives left, which might increase the heap usage to more than 30 KB, when collected. Thus I'd recommend to increase the heap size a little bit more to about 40 or 50 KB, just as a precaution. We'll see. I'll up to 32 in the mean time.
You can test this out in the new build coming up where I made a few lander modifications. Storage is doubled in all areas and the lander lands on spot. The only graphical glitch is the lander cargo, you can keep pickup up materials and life forms after the gauge reaches the top. Though the little grey storage tanks underneath your ship compensate for the extra space. I'll figure it out sooner or later.
|
|
« Last Edit: June 27, 2016, 11:52:21 pm by Kohr-Ah Death »
|
Logged
|
The artist once again known as Kohr-Ah Death 213. Get your MegaMod HERE
|
|
|
|
|
|
|
Jugger
Frungy champion
Offline
Gender:
Posts: 64
|
I've looked into alphabetizing the cfg files, but I couldn't figure it out.
I've looked around in the files too now and will try to help you a little:
In the sources of UQM 0.7.0 ("uqm-0.7.0\src\") and UQM HD Beta ("uqm-hd-0.2"\src\") I found the files setupmenu.c and uqm\uqm.c with the corresponding entries. I guess, that setupmenu.c with the function SetGlobalOptions could be the right one.
In there the next-to-last command is:
SaveResourceIndex (configDir, "uqm.cfg", "config.", TRUE);
This function can be found in the file "libs\resource\resinit.c".
The problem: "config." is a hash table. The sort sequences of the entries in those tables are always undefined, they are ordered randomly. You'd have to put the names and values into a temporary table which must be indexed numerically, then sort it alphabetically by the name-strings, e.g. with the quicksort algorithm, and not till then (after the loop in SaveResourceIndex is finished) you can write the entries one by one into the uqm.cfg.
PHEW! That's too complex and far to much work for such a at the first sight seemingly simple task. So forget it, I didn't request anything in my post #35. And I'm afraid my attempt to help failed.
|
|
|
Logged
|
|
|
|
|
Jugger
Frungy champion
Offline
Gender:
Posts: 64
|
Quicksort was the only thing that came up.
Quicksort is the fastest algorithm for sorting tables I know of. Also its code is short and reliable. I believe, none of the others (like Bubblesort etc.) are used anymore these days. But as I said before, hash tables cannot be sorted, I've already tried this once with a quicksort function I wrote in Lua. Without success, they must be converted to numerically indexed tables first.
If you would like I could set up a git so you could make contributions as well.
Thanks, I will consider that and tell you then.
But my problem is, I'm not very familiar with C. Though the code of this project is stunningly clear and clean compared to many other sources with horrendous cryptic syntax. So reading and understanding it, making some minor modifications, and giving a few suggestions could be within my skill. But there's more. Somewhere here in the forum I've read, that it shall be rather tricky to set up the C environment until it works properly. So I'm not shure, if I can exercise enough patience to learn all this stuff. Good manuals, which I surely will find in the web, are therefore essential.
EDIT, sorry, I missed this:
Of course I can't figure out an implementation that would actually work.
I couldn't find anything in the English-speaking WWW either. But in the German part there are a couple of useful sites. You don't have to understand the text, the shown functions are self-explanatory.
http://www.linux-related.de/index.html?/coding/sort/sort_quick.htm - here you can use right the first one http://www.bluffton.edu/homepages/facstaff/nesterd/java/SortingDemo.html - only one function, written in Java
|
|
« Last Edit: June 29, 2016, 12:44:35 am by Jugger »
|
Logged
|
|
|
|
JHGuitarFreak
Enlightened
Offline
Posts: 1374
|
If you would like I could set up a git so you could make contributions as well.
Thanks, I will consider that and tell you then. But my problem is, I'm not very familiar with C. Though the code of this project is stunningly clear and clean compared to many other sources with horrendous cryptic syntax. So reading and understanding it, making some minor modifications, and giving a few suggestions could be within my skill. But there's more. Somewhere here in the forum I've read, that it shall be rather tricky to set up the C environment until it works properly. So I'm not shure, if I can exercise enough patience to learn all this stuff. Good manuals, which I surely will find in the web, are therefore essential. EDIT, sorry, I missed this: Of course I can't figure out an implementation that would actually work.
I couldn't find anything in the English-speaking WWW either. http://www.linux-related.de/index.html?/coding/sort/sort_quick.htmhttp://www.bluffton.edu/homepages/facstaff/nesterd/java/SortingDemo.html Setting up an environment is easy enough. I've got it down to a replicable science. Visual Studio 2010, either express or enterprise. I have the VS10 libraries needed on Google Drive so I can download them whenever I need them. Actually, any Visual Studio from 6 - 10 works but anything newer than that requires a bit of jiggery pokery I am not skillful enough to deal with.
The devs for HD started working on adjusting the code to work with 12 but I don't think they fully succeeded. They have a binary in their trunk on sourceforge but it is wrought with graphical glitches.
Right now I am working on cleaning up the linker and output when building. Basically making all the compiled code go into a "bin" folder. So far it is being a bit troublesome.
EDIT:
Figured out my linker issue, postprocess command was pointing in the wrong direction and I fixed it.
Now the output goes into the bin folder instead of the root folder. Just seemed too cluttered for my taste.
UPDATE:
Interesting problem, not too severe. UQM-HD can't read the base content from a zip like Classic can, it can read addons just fine when zipped but it kicks back that it can't find the base content when it is zipped and placed appropriately.
|
|
« Last Edit: June 29, 2016, 03:06:17 am by Kohr-Ah Death »
|
Logged
|
The artist once again known as Kohr-Ah Death 213. Get your MegaMod HERE
|
|
|
|
|
Jugger
Frungy champion
Offline
Gender:
Posts: 64
|
Just went through, save... save... save... until the keys were blazing... it works without any problems. Thanks!
|
|
|
Logged
|
|
|
|
|
|