Author Topic: WTF?!?! Help me figure this one out.  (Read 3083 times)

0 Members and 1 Guest are viewing this topic.

Mirathei

  • Sergeant Knight
  • *
    • View Profile
  • Faction: Vaegir
WTF?!?! Help me figure this one out.
« on: July 10, 2008, 01:25:26 AM »
This is a really weird phenomenon. The following is in module_items.py:

Code: [Select]
["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: [Select]
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?


Tempered

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
  • WB
Re: WTF?!?! Help me figure this one out.
« Reply #1 on: July 10, 2008, 01:52:26 AM »
Get some sleep and look at it again tomorrow.  :D

grailknighthero

  • Knight at Arms
  • *
  • www.games-workshop.com
    • View Profile
  • Faction: Neutral
  • M&B
Re: WTF?!?! Help me figure this one out.
« Reply #2 on: July 10, 2008, 02:02:04 AM »
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.
« Last Edit: July 10, 2008, 02:04:43 AM by grailknighthero »
The Peasants' Rebellion: Warhammer Battles - a custom battle mod featuring TW/Warhammer style formations/battles for M&B - currently in development.

Mirathei

  • Sergeant Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: WTF?!?! Help me figure this one out.
« Reply #3 on: July 10, 2008, 02:32:05 AM »
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.

blackrose

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #4 on: July 10, 2008, 02:45:59 AM »
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 shits 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

Gallus Domesticus

  • Knight
  • *
  • Majestic is he who bear the crown of blood.
    • View Profile
    • "Death of the Renaissance" Mod
  • Faction: Swadian
Re: WTF?!?! Help me figure this one out.
« Reply #5 on: July 10, 2008, 02:51:37 AM »
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.

Death of the Renaissance Youtube Channel: http://www.youtube.com/user/DeathOTRenaissance

grailknighthero

  • Knight at Arms
  • *
  • www.games-workshop.com
    • View Profile
  • Faction: Neutral
  • M&B
Re: WTF?!?! Help me figure this one out.
« Reply #6 on: July 10, 2008, 03:08:12 AM »
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.
« Last Edit: July 10, 2008, 03:10:57 AM by grailknighthero »
The Peasants' Rebellion: Warhammer Battles - a custom battle mod featuring TW/Warhammer style formations/battles for M&B - currently in development.

James

  • Golden Crocoduck
  • Grandmaster Knight
  • *
    • View Profile
    • A Medieval Craftsman
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #7 on: July 10, 2008, 03:37:28 AM »
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.

Mirathei

  • Sergeant Knight
  • *
    • View Profile
  • Faction: Vaegir
Re: WTF?!?! Help me figure this one out.
« Reply #8 on: July 10, 2008, 03:47:48 AM »
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.  :?:
« Last Edit: July 10, 2008, 03:54:00 AM by Mirathei »

blackrose

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #9 on: July 10, 2008, 04:16:31 AM »
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?)

Kayne

  • Sergeant
  • *
    • View Profile
  • Faction: Sarranid
Re: WTF?!?! Help me figure this one out.
« Reply #10 on: July 10, 2008, 04:42:18 AM »
maybe too many items?
IDK, weird

blackrose

  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #11 on: July 10, 2008, 04:54:15 AM »
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 http://www.mbrepository.com/modules/PDdownloads/singlefile.php?cid=4&lid=616 and the ran the build_module.bat and it worked :D

grailknighthero

  • Knight at Arms
  • *
  • www.games-workshop.com
    • View Profile
  • Faction: Neutral
  • M&B
Re: WTF?!?! Help me figure this one out.
« Reply #12 on: July 10, 2008, 05:20:31 AM »
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. 
The Peasants' Rebellion: Warhammer Battles - a custom battle mod featuring TW/Warhammer style formations/battles for M&B - currently in development.

Shadow0

  • Sergeant
  • *
    • View Profile
    • ShadowWolves
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #13 on: July 10, 2008, 08:13:59 AM »
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.
ShadowWolves - Move as one, fight as one, win as one.

lord pettitt

  • Recruit
  • *
  • Permanently Banned
    • View Profile
  • Faction: Neutral
Re: WTF?!?! Help me figure this one out.
« Reply #14 on: December 25, 2008, 02:25:13 AM »
is this working correctly now or is it still native