WTF?!?! Help me figure this one out.

Users who are viewing this thread

Mirathei

Sergeant Knight
This is a really weird phenomenon. The following is in module_items.py:

Code:
["flintlock_pistol", "Flintlock Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(1.5)|difficulty(0)|spd_rtng(38) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(1)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["double_barrel_pistol", "Double Barrel Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 260 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(2)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["double_barrel_pistol_2", "Heavy Double Barrel Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 270 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(52 ,pierce)|max_ammo(2)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["double_barrel_revolver", "Double Barrel Revolver", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 450 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(12)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["four_barrel_pistol", "Four Barrel Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 280 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(4)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["blunderbuss", "Blunderbuss", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 290 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(71 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["khergit_pistol", "Khergit Pistol", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 300 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(1)|accuracy(95),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["pepperbox_revolver", "Pepperbox Revolver", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 280 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(46 ,pierce)|max_ammo(60)|accuracy(73),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],
["revolver", "Revolver", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_bonus_against_shield ,itcf_shoot_pistol|itcf_reload_pistol, 320 , weight(1.5)|difficulty(0)|spd_rtng(60) | shoot_speed(160) | thrust_damage(41 ,pierce)|max_ammo(60)|accuracy(75),imodbits_none,
 [(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15),(particle_system_burst, "psys_torch_fire", pos1, 15),])]],

The module system compiles without any errors. I start up the mod, play for a bit, and all changes are made. I use those items above and its all good. Go to item_kinds1.txt in the mod folder, and this is the only firearm:

Code:
 itm_flintlock_pistol Flintlock_Pistol Flintlock_Pistol 1  flintlock_pistol 0  4259856 481036795904 230 0 1.500000 100 0 0 65 0 0 38 160 0 1 297 0
1
-51.000000  4 600 1 1152921504606847038 720 2 1 27 721 2 1 36 1969 3 1008806316530991123 1 15

The mod works fine,  but if I send it to a zip file and install it from the zip to my mods folder, it becomes native again, so I can't release my mods. I'm quite sure I'm looking at all the right folders.


Here's the weirdest part, though- I can replace the entire file with pure gibberish, and the mod still works fine unless I send it to a zipped folder and then unzip it again.

Anyone have any ideas what the hell is going on?

 
Ive seen similarly strange things in python (actual python programming), but this is with text files.

Do the text files revert after playing your mod, or also if you open the text files right after you compile?  I wonder if the game is somehow causing this.
 
grailknighthero said:
Ive seen similarly strange things in python (actual python programming), but this is with text files.

Do the text files revert after playing your mod, or also if you open the text files right after you compile?  I wonder if the game is somehow causing this.
I've opened them before and after playing and compiling, and they don't change, period. If I replace them with gibberish, and then play the mod, the mod works fine and they are still filled with gibberish when I am done.
 
Given what you said about the mod working fine after replacing the files with gibberish, it sounds like an issue with what files are being used where. Just for ****s and giggles, after confirming the mod works on your computer one last time, why not try uploading/zipping your whole M&B folder and unzipping it and seeing if your and/or other mods work after unzipping that. While this doesn't actually solve the problem, it at least might help you get closer to solving it
 
I'm not sure if I got it right but I think you're saying that the game runs with the changes in it even though the changes aren't in the files?

Purely guessing, build_module might be building the files into the wrong places?

Did you check the "date modified" part of the text file? If it didn't change, maybe build_module never built into that folder.


Replacing it with gibberish and have it all still work might also be because the changes were being built into a wrong place.
 
Mirathei said:
grailknighthero said:
Ive seen similarly strange things in python (actual python programming), but this is with text files.

Do the text files revert after playing your mod, or also if you open the text files right after you compile?  I wonder if the game is somehow causing this.
I've opened them before and after playing and compiling, and they don't change, period. If I replace them with gibberish, and then play the mod, the mod works fine and they are still filled with gibberish when I am done.

So the changes are in game and not the text files?  That makes no sense because for something to be in game, it has to be in the text files.  Just an idea, backup the brfs and the textures and delete your mod's folder, then start over and compile.
 
Are you sure you're looking at the same mod you're changing? It sounds like you're just looking at the txt files of a different mod. That's the only thing that would make sense.
 
I just tried doing it to all the mods. Same results, except now there's one mod that won't start, but I copied its entire folder, and the copy somehow worked.  :???:

EDIT: even weirder- I just deleted the mod that wouldn't start, and then renamed the copy to its original name. The copy stopped working. Renamed the copy to something else, and it worked just fine. Renamed native to the name of the mod that wasn't working, and that worked just fine. Something about the .ini and main picture in combination with that mod's name kept it from starting. Any other name worked. All text files in all mods I made are identical to native, and all have the features I coded.  :?:
 
Well. at least now you know the problem isn't specifically with your mod. Did you try using a different program to zip (Winzip if your using Winrar, or Winrar if you are using Winzip?)
 
Woot! I found a way to make it work. It isn't the simplest solution, but it functions damnit. First I downloaded the most recent Magic Mod (yes, the one that doesn't work and for all intents is native). Then I downloaded the source files here https://www.mbrepository.com/file.php?cid=4&id=616 and the ran the build_module.bat and it worked :grin:
 
Ya, but that doesnt work for those who dont know how to mod, nor does it fix the problem.  I'd pm Armagan and see if this has happened to them. 
 
This seems more like a problem with your computer or something in one of the programs used to build the module than anything else... But it's so weird, I've never heard of such a thing happening before o_O the best you could do right now is give someone a copy of your source code so they can build it until you find a proper solution to this possibly first ever problem.
 
Back
Top Bottom