Shop  •   Avatar  •   FAQ  •   Search  •   Memberlist  •   Usergroups  •   Profile  •   Log in to check private messages  •   Log in  •  Register 

Python based ModMan(ager)
Post new topic   Reply to topic     Forum Index -> Customization & Modding
View previous topic :: View next topic  
Author Message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Thu Jan 09, 2014 5:07 pm    Post subject: Python based ModMan(ager) Reply with quote

Several months ago another board member and I started to develop a Mod Manager based on Perl. However I crashed my drive in late Nov and lost everything. I'm starting fresh with python. So far so good. The reason is mac users have both Perl and python installed and windows has neither. With python and py2exe I'm hoping to develop a mod manager that's a simple .exe file.
The level 1 ModMan will be able to take a simple script written by a gamer with a good working knowledge of the game and install or remove a mod with surgical precision.
The level 2 ModMan will be able to switch certain attributes (flags,music, GD's,clothes) on the fly (certain attributes load at game start and therefore can't be altered in game.
Anybody a python programmer please let me know. So far I'm doing OK but I don't want to make this another 6 month project.
To give big credit where credit is due. This whole thing was inspired by jlangsdo's many excellent patch's and mods and the original Perl ModMan started as a tweak to one of his Perl scripts.
Back to top
View user's profile Send private message
Pirate
Helmsman
Posts: 5927



117641 Gold -

PostPosted: Tue Jan 21, 2014 10:56 pm    Post subject: Reply with quote

Sorry nobody has replied to this. Seems like a worthy project to me. I do appreciate folks trying to make the game better and more enjoyable for all of us. Sad to say though I would be about as worthless as play money at the check out counter inside your local supermarket on this project. As the ole lady likes to quote often to me ( Your stupid ) might be as good of a reason as any as to why I would be of little assistance but surely there must be someone out there who can help. Hopefully this will get the ball rolling for you and if not it's about the best I can do until I learn my ABC's. Smile
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Wed Jan 22, 2014 7:22 pm    Post subject: dire need Reply with quote

I am stuck on the exe conversion subroutine as I do not know how to see the info as the python interpreter sees it. I knew how to do this with PERL. Its writing to the program just in the wrong format. Any PYTHON gurus out there? I use stackoverflow but sometimes they just don't get the gist of the question, as in this example.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Thu Jan 23, 2014 6:23 pm    Post subject: Reply with quote

When you say it is in the wrong format, what exactly is wrong? Do a null mod and then compare to the original file using a hex editor.

A standard problem in perl on Windows is forgetting to designate the pipe as 'binmode' which means that it translates \n to \r\n when writing. See if that is your problem.

Another common issue, when writing integers, is getting the wrong endianness; bigendian vs littleendian.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Fri Jan 31, 2014 11:00 pm    Post subject: Glad ur back! Reply with quote

When it was written in perl, I only had to do a tweak or 2 on your parameters to get the pirates!.exe mod/unmod to work flawlessly. Now I'm doing the rewrite in python and still having this issue:
I have the subroutine that determines weather the patch is changing a hex value (think of the LH pane of hexedit) or the ansi value (think of the RH pane of hexedit). I have written the code that sees a hex change and equalizes the OLD: and NEW: portions of the patch to the same as the "data" string fed in from the exe. Everything is a single stream of lowercase hex. It successfully locates the OLD: in the "data" but when it writes it is "writing" to the RH pane to hex, not the LH pane. (Think hexedit).
The file is being opened in b (binary) format but that does not seem to help. What is the pack and unpack used for? This is the struc.pack struc.unpack in python.
Back to top
View user's profile Send private message
jlangsdo
Cutthroat
Posts: 398



11012 Gold -

PostPosted: Thu Feb 06, 2014 3:35 pm    Post subject: Reply with quote

The perl pack and unpack are for converting from numbers to bytes; like the ord() and chr() functions in python.
Back to top
View user's profile Send private message
parksbanyon
Gunner
Posts: 564



13127 Gold -

PostPosted: Thu Mar 06, 2014 8:44 pm    Post subject: Back Again Reply with quote

working on the macbook 13" as the dell is dead. Got the exe functional in both alpha and hex search and replace mode, now on to text i.e. dealing with UTF 16 again. Won't have the "new" dell back until the end of march. Life goes on.Actually didn't directly call on the ord or chr functions. used hexifiy (don't recall if it calls up the ord() chr() functions)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Customization & Modding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group