Y_Less 1 Posted August 13, 2005 @DemolitionMan™: You also don't need all that extra thread creation, especially as your thread has no end, it would be easier to just do: ;----------------------------; only edit below;----------------------------:LabelDARKPACT ;----------------------------; only edit above;----------------------------;-------------Mission 0---------------; Originally: Initial 1:INITIAL_1;----------------------------; only edit below;----------------------------014B: $GARAGE_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.295 156.7247 34.66154 angle -90.0014C: set_parked_car_generator $GARAGE_HYDRA cars_to_generate_to 101;----------------------------; only edit above;---------------------------- Edit: Also, Dem, how does this work on SA without DMA as you said you needed in the original version? Quote Share this post Link to post Share on other sites
DemolitionMan™ 0 Posted August 13, 2005 what's DMA? Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 1. Opened Mission Builer and decompiled the original /data/script/main.scm2. Searched for "-Mission 0-" and put my code above it 3. Compiled it and ranamed the output to "mymod.scm" 4. Cleared the file and put the source from "darkpactv1.txt" in the clear builder file. 5. Searched for "-Mission 0-" and put my code above it 6. Put the "004F: create_thread ££mymod" under ":INITIAL_1" 7. Compiled it and renamed the output to "DARKPACTmymod.scm" 8. Loaded a savegame using "DARKPACTmymod.scm" 9. well...crash First, make sure that you have all the external scripts at the end of the file. If you don't then redownlaod darkpact as I think thye were removed at first and not put back in until now. Then, make sure that you removed the original create_thread and its label if you are adding your own one in. Once you have done that then it should work fine. If not, try doing a simple thread as a test, to make sure it is not your code that is causing the crash. @DemolitionMan™: you do not need that :LabelDARKPACT line, but leaving it in does no harm Well, I got it working ONE time now. Sadfully it crashes when I try to use Darkpact with my 80cars garage mod Quote Share this post Link to post Share on other sites
DemolitionMan™ 0 Posted August 13, 2005 My code is like this and it crashes ;----------------------------; only edit below;---------------------------- ;----------------------------; only edit above;----------------------------;-------------Mission 0---------------; Originally: Initial 1:INITIAL_1;----------------------------; only edit below;----------------------------014B: $GARAGE_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.295 156.7247 34.66154 angle -90.0014C: set_parked_car_generator $GARAGE_HYDRA cars_to_generate_to 101 014B: $GARAGE_HUNTER = init_parked_car_generator 425 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.058 124.5032 34.7961 angle -90.0014C: set_parked_car_generator $GARAGE_HUNTER cars_to_generate_to 101 014B: $GARAGE_RANCHER = init_parked_car_generator 489 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2030.258 143.9549 28.97603 angle -90.0014C: set_parked_car_generator $GARAGE_RANCHER cars_to_generate_to 101 014B: $GARAGE_MOONBEAM = init_parked_car_generator 418 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2045.655 121.7934 28.97228 angle 180.0014C: set_parked_car_generator $GARAGE_MOONBEAM cars_to_generate_to 101014B: $GARAGE_INFERNUS = init_parked_car_generator 411 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2035.169 170.3039 28.56302 angle -90.0014C: set_parked_car_generator $GARAGE_INFERNUS cars_to_generate_to 101 014B: $GARAGE_TURISMO = init_parked_car_generator 451 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2034.835 178.8182 28.5476 angle -90.0014C: set_parked_car_generator $GARAGE_TURISMO cars_to_generate_to 101 014B: $GARAGE_BULLET = init_parked_car_generator 541 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2036.641 132.875 28.4645 angle -90.0014C: set_parked_car_generator $GARAGE_BULLET cars_to_generate_to 101 014B: $GARAGE_MONSTER = init_parked_car_generator 556 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2052.338 145.9388 29.21094 angle 180.0014C: set_parked_car_generator $GARAGE_MONSTER cars_to_generate_to 101 014B: $GARAGE_NRG-500 = init_parked_car_generator 522 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2032.408 152.1684 28.60803 angle 180.0014C: set_parked_car_generator $GARAGE_NRG-500 cars_to_generate_to 101 014B: $GARAGE_SANCHEZ = init_parked_car_generator 468 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2032.361 156.2713 28.70985 angle 180.0014C: set_parked_car_generator $GARAGE_SANCHEZ cars_to_generate_to 101;----------------------------; only edit above;---------------------------- Quote Share this post Link to post Share on other sites
superglitch 0 Posted August 13, 2005 My code is like this and it crashes ;----------------------------; only edit below;---------------------------- ;----------------------------; only edit above;----------------------------;-------------Mission 0---------------; Originally: Initial 1:INITIAL_1;----------------------------; only edit below;----------------------------014B: $GARAGE_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.295 156.7247 34.66154 angle -90.0014C: set_parked_car_generator $GARAGE_HYDRA cars_to_generate_to 101 014B: $GARAGE_HUNTER = init_parked_car_generator 425 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.058 124.5032 34.7961 angle -90.0014C: set_parked_car_generator $GARAGE_HUNTER cars_to_generate_to 101 014B: $GARAGE_RANCHER = init_parked_car_generator 489 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2030.258 143.9549 28.97603 angle -90.0014C: set_parked_car_generator $GARAGE_RANCHER cars_to_generate_to 101 014B: $GARAGE_MOONBEAM = init_parked_car_generator 418 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2045.655 121.7934 28.97228 angle 180.0014C: set_parked_car_generator $GARAGE_MOONBEAM cars_to_generate_to 101014B: $GARAGE_INFERNUS = init_parked_car_generator 411 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2035.169 170.3039 28.56302 angle -90.0014C: set_parked_car_generator $GARAGE_INFERNUS cars_to_generate_to 101 014B: $GARAGE_TURISMO = init_parked_car_generator 451 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2034.835 178.8182 28.5476 angle -90.0014C: set_parked_car_generator $GARAGE_TURISMO cars_to_generate_to 101 014B: $GARAGE_BULLET = init_parked_car_generator 541 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2036.641 132.875 28.4645 angle -90.0014C: set_parked_car_generator $GARAGE_BULLET cars_to_generate_to 101 014B: $GARAGE_MONSTER = init_parked_car_generator 556 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2052.338 145.9388 29.21094 angle 180.0014C: set_parked_car_generator $GARAGE_MONSTER cars_to_generate_to 101 014B: $GARAGE_NRG-500 = init_parked_car_generator 522 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2032.408 152.1684 28.60803 angle 180.0014C: set_parked_car_generator $GARAGE_NRG-500 cars_to_generate_to 101 014B: $GARAGE_SANCHEZ = init_parked_car_generator 468 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2032.361 156.2713 28.70985 angle 180.0014C: set_parked_car_generator $GARAGE_SANCHEZ cars_to_generate_to 101;----------------------------; only edit above;---------------------------- what's your progess on the game save, some of more developed game saved don't work, correctly with DarkPact, yet Quote Share this post Link to post Share on other sites
DemolitionMan™ 0 Posted August 13, 2005 100%. Saved at CJ's house Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 sorry demarest i ask alot of questions i just dont understand this kind of stuff, i know how to replace files in my game and all, i guess i just dont get how it all works, thank you for being patient with me tho I'm trying, but this (not you) is doing my head in. I hear what you're saying, but experience isn't require to differentiate between script and code mods when the instructions do that already. 1. Opened Mission Builer and decompiled the original /data/script/main.scmNO! Darkpact is your MAIN. i get an error when i compilehttp://img360.imageshack.us/img360/9928/error6zq.png It goes without saying that both your Builder and your code must be FUNCTIONAL before you even think about Darkpact. If you come here without the aforementioned being true (essentially making the rest of us think that Darkpact has other flaws), you will be castrated just to be sure. scripts must be like this right? ;----------------------------; only edit below;----------------------------:LabelDARKPACT 014B: $GARAGE_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at -2028.295 156.7247 34.66154 angle -90.0014C: set_parked_car_generator $GARAGE_HYDRA cars_to_generate_to 101;----------------------------; only edit above;----------------------------;-------------Mission 0---------------; Originally: Initial 1:INITIAL_1;----------------------------; only edit below;----------------------------004F: create_thread ��LabelDARKPACT;----------------------------; only edit above;---------------------------- First things first, you will need a name thread and an end thread. I realize that the released TXT didn't have that, but normally the end_thread wouldn't be needed. The instructions specifically say that if you need to insert a one time thing, just put it in mission 0. MAIN is for code that will run and continue to run. BTW, I'm almost certain that parked car generators need to be setup during the initial run of code, so even if you code what you're doing right, it won't appear in game as you intend. I could be wrong. First, make sure that you have all the external scripts at the end of the file. If you don't then redownlaod darkpact as I think thye were removed at first and not put back in until now.As luck would have it, I actually had to reinstall Windows just as I learned about this. So updated files/instructions are not available yet. I'm doing that now and a notice will appear at the beginning and ending of the thread when they're made. Thank you for all your help so far as well as your patience. Edit: Also, Dem, how does this work on SA without DMA as you said you needed in the original version?I wasn't aware until I read the MB readme that DMA is in fact still in effect. When you see for example the $940 as the array of playerX after saving, that's comparable to old skool 3760??. Barton never got around to removing it In fact, reading the readme, I'm not actually QUITE behind the revisions he made. Pretty smart for the most part. I think you're right though. Without DMA on compile, Darkpact would not be possible. Well, I got it working ONE time now.Sadfully it crashes when I try to use Darkpact with my 80cars garage mod Let me know how it works after you do as I stated above and with the new files... @Demolition Man: (and everybody) WAIT until the new package is released. Crashed until then could be the stupid externals. I'm going to do it now, but I can't even respond to this thread because you guys keep posting! Sorry for the bitchiness. This is doing my head in, plus had to reinstall Windows... With the exception of the castration remark, I'm doing great at not taking it out on anybody New files will be up shortly. Thanks to everybody for your interest. Quote Share this post Link to post Share on other sites
superglitch 0 Posted August 13, 2005 @Demarest: Great job on clearing up stuff, and you can blame me i don't care... For the rest ya, some of ya are asking very simple questions, like the IDE question with the error code for #NULL. He's really doing a great job at this, i wouldn't be able to handle it. TIPS: 1. Research any errors 2. If your using a game that is even close to 100% wait till a updated and revised version is realease. 3. Sit back and stop posting! This thread has gone from like 7 posts to 36 in 25-45 mins, insane! Good Luck Dema on fixin it. Quote Share this post Link to post Share on other sites
DemolitionMan™ 0 Posted August 13, 2005 lmao so? i like to post Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 @Demarest: This is how I did it and how it works for me on a smaller mod: Creating SCM + my mod: 1. Opened Mission Builer and decompiled the original /data/script/main.scm 2. Searched for "-Mission 0-" and put my code above it 3. Compiled it and ranamed the output to "mymod.scm" Creating Darkpact + my mod: 4. Cleared the file and put the source from "darkpactv1.txt" in the clear builder file. 5. Used the following lines for the saveprompt: @0 = -1:DARKPACT 0001: wait 0 ms @0 += 100D6: if 000FE: actor $PLAYER_ACTOR 0 ()near_point $SAVEPOINTX(@0,18f) $SAVEPOINTY(@0,18f) $SAVEPOINTZ(@0,18f) radius 15.0 15.0 15.0004D: jump_if_false ££DARKPACT00A1: put_actor $PLAYER_ACTOR at $SAVEPOINTX(@0,18f) $SAVEPOINTY(@0,18f) $SAVEPOINTZ(@0,18f) :DARKPACTDONE0001: wait 0 ms00D6: if 003D9: save_done004D: jump_if_false ££DARKPACTDONE0004: $ON_MISSION = 0 ;; integer values004E: end_thread 6. Searched for "-Mission 0-" and put my code above it (above ":INITIAL_1") 7. Put the "004F: create_thread ££mymod" under ":INITIAL_1" 8. Compiled it and renamed the output to "DARKPACTmymod.scm" 9. Loaded a savegame using "DARKPACTmymod.scm" 10. Saved to a new slot 11. Loaded this savegame using "mymod.scm" works...but it doesnt work with my garage mod. Further it doesnt work when I use "DEFINE MEMORY 46500". This lets the game crash right before it tries to prompt the savepromt (thats created by your ":DARKPACT") Quote Share this post Link to post Share on other sites
DemolitionMan™ 0 Posted August 13, 2005 46500 is too big Equals Mission Builder type global variable range $2 to $10949 Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 (edited) Changing the define memory from what it was in the original is not a good idea, as this will mean there are more/less 0's at the start of the file resulting in all the offsets being different. Try lowering your limit of 80 to something low for a test to see if it is just that there is not enough memory. nvm, new files released anyway Edited August 13, 2005 by random_download Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 @Demarest: Great job on clearing up stuff, and you can blame me i don't care...Blame you? I should be thanking you! It was you working with me that revealed this problem that allowed it to be fixed within 24 hours of release! So thank you lmao so? i like to post Post some more crap like that and I'll make sure you get banned works...but it doesnt work with my garage mod. Further it doesnt work when I use "DEFINE MEMORY 46500".Of course not. If you change the define memory line, you're no longer using Darkpact. Memory and address location is the very reason why savegames and SCMs are non-interchangeable in the first place. Darkpact serves to subvert that, but can't if you're TELLING IT to move stuff around. New files released. Will edit first post now to reflect that. Main change is the presence of the external threads in the TXT and a minor references in the readme as to how that changes things. Also added a name_thread command in the thread that Darkpact creates. Change it if you want, but leave it there. Leaving in the name_thread paves the way for a tool that MAY be released later that will allow you to remove added mods so that your save can go BACK to being compatible with original code. But that's for a later date, if at all. Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 Change it if you want, but leave it there. Leaving in the name_thread paves the way for a tool that MAY be released later that will allow you to remove added mods so that your save can go BACK to being compatible with original code. But that's for a later date, if at all. I'm not sure if end_thread_named works anymore I remember using it but it didn't work, not sure if it was in VC or SA though, although if it was removed in VC it is unlikely that it will have been put back in for SA. Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 Haven't even begun to think about it and really don't want to this second. After tearing my hair out, reinstalling Windows, and rushing to release the fix--all the while answering questions that were already answered--I'm taking a small break I DO know the command is in VC because for whatever reason, they use Old Friends to kill the lawyer thread before it. Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 So its not possible to use mods that need more memory than default "43800" with Darkpact? Demarest, please don't take me wrong. Your work is like a revolution for the whole mission modding, I love your work! Just asking if these bigger mods (with more memory) are possible or not DemolitionMan: My garage mod works (if you use it normal... so start a new game). Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 No, you will not be able to change the define memory either to more or less. Try making the array smaller so as not to take up so much memory. Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 Thank you. I don't deserve credit though. For one, it was mostly through CyQ's education. Secondly, it's not for me. It's for everybody. I agree it's revolutionary because now, coding mods will be a lot more popular. As for bigger mods, why not use locals? Has the ceiling yet been established on local var use? The original game is only going to have so many holes in it. I don't know if arrays need their memory locations to be sequential, but if they do, I can all but guarantee the mods with global arrays (do local arrays even exist?) will not be insertable. If you're unable to use all locals, maybe slim the number down. Succeed in doing this and your mod's popularity will go through the roof because those interested won't have to start over If you DO succeed, publish your finding for authors of garages in different locations Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 Yes, local arrays can be used. I scripted a very similear garage but using local arrays and coords in the create_thread line to enable multiple garages. I'm not sure if the game would take kindly to large numbers of cars being stored in them though. Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 What about local amounts? I've read 33 was the limit, but have seen them much higher. If we know the ceiling, Darkpacting will become even more useful for times just like these. Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 Thats the main problem. I guess you can't use local arrays for my garage mod. These cars and all their information is saved and loaded to/from a savegame. Is that possible with local vars?!? Dont think so. Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 13, 2005 If it wasn't, then 50% of the code mods out there wouldn't work. Locals are only different from globals in that only the thread that created them can interact with them and (in terms of the Builder) they can't have custom names. By all means (here or in your garage thread), explain the issue with locals you're experiencing. I'm every bit as eager as you to get it to work. I'd like to see Darkpact work with the largest number of mods possible To add to that, now that I have SA, you're going to see me more willing to pitch in on the projects of others. Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 Great, I didn't know that. Now I have another problem, your new version of Darkpact gives me: "Memory beyond the defined range has been accessed. Use DEFINE MEMORY 43929 or higher to allocate memory". This happens also if I use the unchanged version! Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 This is when trying to use your garage mod with it I assume? If it says that then you will need to cut down on the amount of memory used, ie. make it so that the garage can store less cars. Quote Share this post Link to post Share on other sites
nubbel 1 Posted August 13, 2005 This is when trying to use your garage mod with it I assume? If it says that then you will need to cut down on the amount of memory used, ie. make it so that the garage can store less cars. NO! Read above, unchanged code from the new darkpactv1.txt procudes this memory error. Did you try the new version and does it work for you? Quote Share this post Link to post Share on other sites
random_download 0 Posted August 13, 2005 I do indeed get that same error. I have no idea why though :S I don't know what was added, but there seems to be an extra 100kb in the new release than what I have that works. Try going here and downloading "darkpactv1.zip", which works fine for me and has no memory defined problems. Quote Share this post Link to post Share on other sites
superglitch 0 Posted August 13, 2005 @Dema: I tried random;'s link and it crashed, if I use your link it says define memory, so i do, then it crashes, I tried without defining memory(since it still complies) and it still doesn't work. I think maybe my gamesave is jacked Quote Share this post Link to post Share on other sites
Demarest 23 Posted August 14, 2005 Just a reminder: NEVER change the Define Memory line. Doing so is guaranteed to not work. I don't know what the problem is. I just compiled perfectly fine. All I did (as already stated) was toss in the externals at the end and add the name_thread line. Compiles fine for me. I used Glitch's mod as a test run and game loads up and his mod is in full effect. No probs at all. I got my Builder from Craig's site. It's the most up to date 0.33 as far as I know. I've heard that earlier versions put the externals before missions. If that's true and you're using that version, maybe it's considering all the externals to be part of the mission section. That's the only explanation that makes sense to me. I'll try and diagnose further, but it all works perfectly over here Quote Share this post Link to post Share on other sites
random_download 0 Posted August 14, 2005 Hmm... I tried using the compiled scm from the new files and it seemed to work fine except that when I loaded I found the player locked and hovering just over the save point without actually triggering the save This is weird, because I used the EXACT same code for mission 0 in the link I posted and everything works fine :s Quote Share this post Link to post Share on other sites
Y_Less 1 Posted August 14, 2005 If it wasn't, then 50% of the code mods out there wouldn't work. Locals are only different from globals in that only the thread that created them can interact with them and (in terms of the Builder) they can't have custom names. By all means (here or in your garage thread), explain the issue with locals you're experiencing. I'm every bit as eager as you to get it to work. I'd like to see Darkpact work with the largest number of mods possible To add to that, now that I have SA, you're going to see me more willing to pitch in on the projects of others. I thought BW added named locals in the newest version because there are so many. Quote Share this post Link to post Share on other sites