Announcement

Collapse
No announcement yet.

UTILITY: Civ3MultiTool - A thread for the Program ;)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Originally posted by korn469
    Gramphos

    i bet the reason you can't get it to load is that you don't have the partisan folder in your C:\civ3\Art\units directory, however it weighs in at over a meg so i can't upload it
    Yes, that's right, So, what folder should I copy?
    And it loaded to my tool (forgot that I tried to load it at another computer where I hadn't changed the civ3mod.bic, and as the Americans have one Partisan my tool crashed)
    Creator of the Civ3MultiTool

    Comment


    • Originally posted by Grim Leaper
      The error is very odd, i don't recall have any problems with vb programs before. as i have said i have vb5.0 learning edition installed on my computer, and i believe i have the correct files.

      Here's what happens:
      i unzip the file into a directory. there is just your exe there. then i run the exe and before anything happens (no forms/window and program doesn't appear on the takbar) i get a warning message box, with caption 'Error' and text 'Unexpected Error', with an OK button. That is all. I click OK and the program quits.

      I think it is to do with vb or windows (ME) and not you program, because the program does not appear to actually start. Where can i get the service packs from, MS site? i guess that might be the problem.
      What are your sys-spec? Try the latest version (has a splash screen that shows up before any program error can be generated)

      How about you post the source code, i'd be very interested into how you did it

      I maybe will do that later, when I get some more structure to my functions, right now some things are in functions and other stuff direct in the form code. Also 50% of the comments are Swedish. I'll not give away such code.
      Creator of the Civ3MultiTool

      Comment


      • v0.70.1

        Bug with the SaveEditor fixed. (Nothing dangerous, a loss of some movement points if roads had been used corrected)

        Out after 73 downloads
        Last edited by Gramphos; November 23, 2001, 16:37.
        Creator of the Civ3MultiTool

        Comment


        • I feared as much:
          I downloaded your new version and the error appears before the program starts (no splash screen you mentioned).

          I have a 700/750 PC with 128 ram running windows ME and VB5.0 Learning Edition (i presume sp1 as i haven't updated it). vb appears to work fine. i have Comdlg32.ocx version 5.something so that might be the problem, altough i would have expected a better error mesage if that was the case. If you know where i can get the service pack from i will try downloading it tonight.

          I would love to see the code you've written, as i enjoy programming but am not to good at it.

          Also 50% of the comments are Swedish. I'll not give away such code.
          I don't mind too much, i'm danish my self, and need some improvement on it.

          Comment


          • Originally posted by Grim Leaper
            I have a 700/750 PC with 128 ram running windows ME
            The only thing I'm uncertain of is Windows ME, can any ME user use this tool?
            and VB5.0 Learning Edition (i presume sp1 as i haven't updated it). vb appears to work fine. i have Comdlg32.ocx version 5.something so that might be the problem, altough i would have expected a better error mesage if that was the case. If you know where i can get the service pack from i will try downloading it tonight.
            It is really big, I got it somewhere at Microsoft.com, but the Comdlg32.ocx version has another history.
            I got it with VB6 working module, and it replaced the version 5.? that came with the servicepack. Other controls got new names, but that replaced the earlier version, and I had to stick with a vb6 file. (I have uninstalled the Working Module now, as I don't use it.)

            I would love to see the code you've written, as i enjoy programming but am not to good at it.
            I'll see if I can release some code later, but not yet. I have to make it a bit more finished before. (I change some load code with each version to make it easier to follow the code, and prepare for later versions)


            I don't mind too much, i'm danish my self, and need some improvement on it.
            Ah, I didn't know that.


            The right DLL-files can be obtained at http://support.microsoft.com/support.../Q180/0/71.ASP
            I'll look for the controls. If I can't find them I'll make a 2 MB (approx.) setup that includes everything.
            Creator of the Civ3MultiTool

            Comment


            • okay, i downloaded the files, installed them, had my tea, and tried again.

              Unforytuantly nothing changed.Still get error before it starts. I imagine it is vb run-time related, but i'm kinda lost at sea here. What does everyone who doesn't have vb use to get the program to run.? Is it just the normal vb runtime file? I also tride looking for service pack for 5.0, but to no avail. Microsodt only have sp's for vb6.

              out of interest approx how much code is in there? i imagine most of it is for reading and saving the .bic file in the right order.

              Anyway enough of this for now. i shall go and play civ

              Comment


              • This two files together with that exe shuld be all files needed. The Cabs has to be extracted and the inf-files used for the installing.



                Creator of the Civ3MultiTool

                Comment


                • Originally posted by Grim Leaper
                  out of interest approx how much code is in there? i imagine most of it is for reading and saving the .bic file in the right order.
                  The file that handles PCX read/write is 220 lines (approx.) (I have counted it down some for comment lines).
                  The file that READS the BIC, read and write SAVs and reads/writes all full structures (the one I read more then the name from (BLDG, PRTO, RACE and RULE as the moment (I'm writing functions for all, but I can't make it all at the same time.))) and contains functions, constants, types and global variables is 1400 lines (including comments (all full sections layout (I think I shall remove them later, but as long at I change things I have them there))) The function that reads the BIC (not including the called functions in that file is 210 lines (and shrinking ))

                  Still most of the code is unused, I don't need to store every data as the exact values, I could store them without decoding them, but I write the decoding as I might want to use it later, without having to rewrite everything.

                  The Copy Form itself has 1400 lines of code as well, and that includes all the copy code, except the one that uses the write functions (only BLDG right now IIRC, but I plan to make PRTO and RACE as well, as it would mean less code, and a more structured code.) (It actually has code for writing BICs in four places (I will write a more common function later)) I will also write functions for the text-file modifying as soon as I know for sure what variables I need to pass to it.

                  The Export Tool stays at 150 lines, mostly because it uses the write functions for the parts of the BIC. The Import Form has 400 lines code. Finally the SaveEdit has 120 lines (All save are made in the mainfunction. The code only handles the variable updates and the interface)

                  (I call both subs and functions for functions)



                  About Reading the BIC in the right order that isn't very mush of the code, the most is reading and writing all the sections in the right way.

                  For BICs you could use
                  Code:
                  Dim buffer As String, version As Long, Length As Long, FileID as Integer
                  FileID = FreeFile
                  Open BICfile for Binary as FileID
                  	buffer = String(8, 0)
                  	Get FileID, , buffer
                  	If buffer <> "BIC VER#" Then MsgBox "The file is invalid": Exit Sub
                  	Get FileId, , Version
                  	If Version <> 1 Then MsgBox "Unknown Version": Exit Sub
                  	Get FileId, , Length
                  	'Use Get instead of Seek, it is faster
                  	buffer = String(Length, 0)
                  	Get FileId, , buffer
                  	Do Until EOF(FileId)
                  		buffer = String(4, 0)
                  		Get FileId, , buffer
                  		If EOF(FileID) Then Exit Do
                  		Get FileId, , num 'The number of the type in buffer (Except for CULT)
                  		Select Case buffer
                  		Case	"BLDG", "CTZN", "DIFF", "ERAS", "ESPN", "EXPR", "GOOD", _ 
                  			"GOVT", "RACE", "RULE", "CONT", "TILE", "WMAP", "WCHR", _
                  			"WSIZ", "TERR", "TFRM", "TECH", "PRTO"
                  			For i = 1 To num
                  				Get FileId, , Length
                  				buffer = String(Length, 0)
                  				Get FileId, , buffer
                  			Next i
                  		Case "CULT"
                  			Seek FileId, Seek(FileId) + &H4
                  			Get FileId, , num
                  			Seek FileId, Seek(FileId) + num * &H5C
                  		Case Else
                  			MsgBox "Unknown section"
                  			Ext Sub
                  		End Select
                  	Loop
                  Close FileID
                  That code would be able to read a BIC (without getting any info from it)
                  Last edited by Gramphos; November 22, 2001, 16:56.
                  Creator of the Civ3MultiTool

                  Comment


                  • Phew, i am free. Thankyou Gramphos. I couldn't have done it without you.

                    Haven't had a try to see what your program can achieve, i'll do that tomorrow, but at least it works

                    When you mentioned a splash screen, i was picturing a kinda professional one, and wondered for a while why all programmers seem to be able to make all their art so well, but i, alas, cannot. You pleasantly suprised me, in a good way. This is what programming should be about. Short, Sweet, and Simple

                    And now to bed. Cheerio (and thankyou)

                    Comment


                    • Originally posted by Grim Leaper
                      When you mentioned a splash screen, i was picturing a kinda professional one, and wondered for a while why all programmers seem to be able to make all their art so well, but i, alas, cannot. You pleasantly suprised me, in a good way. This is what programming should be about. Short, Sweet, and Simple
                      I'm not an artist, I only added that screen because the loading time was long enough for people start telling me that the tool hung up while loading and never showed up. (I don't even have an icon)

                      And now to bed. Cheerio (and thankyou)

                      You are right.
                      Creator of the Civ3MultiTool

                      Comment


                      • grampos the name of the file is just Partisan in the units files and it contains the normal paratrooper files and the partisan.ini which i included

                        sorry it took so long to get back to you, it was thanksgiving here

                        Comment


                        • here's the file
                          Attached Files

                          Comment


                          • I've checked your savegame, and this is the result:

                            It seems as if the modern graphics in the unist32_pcx begins at #units+iconindex (and not any fixed positions, so when you add a unit the modern art for settlers and workers should be mover one square to the right.) I have to test this more, when does the modern art replace the old?

                            Also the unit showing in the build button has shadow, and is bigger then the icons, which makes me think it is one frame of the animation.


                            I need help investigating if this is true. You should also ask Plutarck about it in his thread as it seem to be a problem with the graphics and not with the BICs. When I know if the modern art has to be moved I might be able to add that to my tool.
                            Creator of the Civ3MultiTool

                            Comment


                            • Known Problems with The SaveGameEditor:
                              - The Owner civ seem to be Nationality civ, but I might be wrong
                              - Some files get an error while loading. It is lategame files that have crap in them that hasn't been fully replaced when the file was saved (The tool finds structures that it believe for units, I'll try to trim the loading function for the SAV, but the overall format is quite complicated)
                              - It can be really hard to get an overview with many units, but right now there isn't mush I can do about that. Maybe will allow search later.

                              If you notice anything else please post, and include both the savgame, and the civ3mod.bic (if not original) that was used when the savegame was saved.
                              Creator of the Civ3MultiTool

                              Comment


                              • Originally posted by korn469
                                grampos the name of the file is just Partisan in the units files and it contains the normal paratrooper files and the partisan.ini which i included

                                sorry it took so long to get back to you, it was thanksgiving here
                                Damn, I was planning to make a Partisan mod when I would have finally got my copy of Civ3.
                                Looks like you bet me to it .

                                LoD
                                I love the tick of the Geiger counter in the morning. It's the sound of... victory! :D
                                LoD - Owner/Webmaster of civ.org.pl
                                civ.org.pl's Discussion Forums and Multiplayer System for SMAC and Civs 2-4

                                Comment

                                Working...
                                X