Problem

Daddicus

Chieftain
Joined
Aug 28, 2010
Messages
47
This thread went into the wrong forum. Should be one level up from here, I think.
Moderator Action: :yup: was wrong, now moved to the main forum. The_J

I'm trying to make a simple mod that disallows maps and barbarian locations from goody huts. I found one in the download area that works, but mine doesn't. I use EXACTLY the same code, so it's not an XML issue. The only thing I can figure is that he has figured out some trick to use to get the code emplaced into the game.

I noticed that my mod (created in ModBuddy) has three top-level folders and two files at the top level, plus other stuff underneath. His mod only has one folder and a single file.

But, I built mine step-by-step the way the guide tells you to (except, of course, for the steps that aren't there -- "Build"-ing and saving files). So, how come mine doesn't look anything like his?

My three folders are Build, Goody Huts No Maps (the name of the mod), and Packages. The files are Goody Huts No Maps.civ5sln and same name.civ5suo.

His folder is XML and the file is Goody Huts - No Maps (v 1).modinfo. In the XML folder is a single file, GoodyHutsNoMaps.xml.

I tried to find answers in the guide and on this forum, but can't find anything explaining why, but it must have something to do with my having the wrong folder structure moved over. What am I missing?

Also, can anyone state the specific steps one needs to take in order to take a written mod from "working on it in ModBuddy" to "installed into the game". These steps are not in the guide, but really need to be. The ones I came up with (which are obviously wrong, since they don't work):

  1. Click Build | Build Solution.
  2. Click File | Save All.
  3. Go to the "My Documents/Firaxis Modbuddy" folder in Windows Explorer.
  4. Copy the mod folder.
  5. Go to the "My Documents/My Games/.../MODS folder.
  6. Paste the folder structure.
  7. Go into the game.
  8. In the Mods area, "Install" the mod.
  9. Check the check mark to allow it to run.
  10. Start up a game.
 
Attach your mod to your post and maybe we can help. Walls of text aren't very useful for this sort of thing.
(I'd suggest zipping it up first, to keep the directory structure intact.)
 
Also, can anyone state the specific steps one needs to take in order to take a written mod from "working on it in ModBuddy" to "installed into the game". These steps are not in the guide, but really need to be. The ones I came up with (which are obviously wrong, since they don't work):

  1. Click Build | Build Solution.
  2. Click File | Save All.
  3. Go to the "My Documents/Firaxis Modbuddy" folder in Windows Explorer.
  4. Copy the mod folder.
  5. Go to the "My Documents/My Games/.../MODS folder.
  6. Paste the folder structure.
  7. Go into the game.
  8. In the Mods area, "Install" the mod.
  9. Check the check mark to allow it to run.
  10. Start up a game.

Most of those steps are unnecessary; Modbuddy should automatically install it for you as long as your paths are setup properly. To check the paths, go to Tools->Options then click on "Civilization 5" (at the bottom of the list). Verify that the game and User Paths are correct, and change them if they aren't.

Once that's done, only the following steps are necessary:
  1. Click File | Save All. (should be done first, although a Build supposedly auto-saves)
  2. Click Build | Build Solution. (all file copying should be done automatically by ModBuddy if the build was successful)
  3. Go into the game.
  4. In the Mods area, check the check mark to allow it to run.
  5. Start up a game.

Regarding this specific problem, don't fret about file structure -- as long as it's consistent (i.e. the paths for Action/Content items match the actual file paths) it'll work. My test mods don't even bother with any subfolders at all usually. I agree with Spatz on this -- the easiest thing is for you to zip up the mod folder and attach it here.
 
I agree with Spatz on this

Only on this? You should agree with me all of the time, it makes things SO much easier.

And yes, the list of steps in the OP could be a problem. You don't need to be copying files around or Installing a mod if you made it yourself, ModBuddy will put everything in the right places as long as you've got the path set correctly. (And if you copy a set of files into the Mods directory, you don't need to use the Install option at all, regardless. Just being in that directory is enough for the game to recognize the addition.)

It's easily possible that that's the problem, in which case giving us the files won't help. But with the files we'll be able to see if anything else is causing the problems, for when you fix that.
 
I'll throw up a quick reply and then more later on the results. BOTH file paths were incorrect in ModBuddy. VERY incorrect, in fact.

The second one I remember being an issue when I set things up. On Windows 7, you have to install as administrator, which all happens for you magically in the background. Well, as it was installing, it seems to have use the admin's account for the second path. I remember having to change the permissions on that folder in order to get it to work. So, I went there (before changing things), and sure enough, there were all the mods I've played with. But, I'm guessing the game itself was using the correct folder, not the one from ModBuddy.

The first one (which must have been emplaced by the game) had half of the backslashes ("\") replaced by forward slashes ("/"). Like this:

C:/Program Files (x86)/Games/Steam\SteamApps\common\sid meier's civilization v

I changed it to this:

C:\Program Files (x86)\Games\Steam\SteamApps\common\sid meier's civilization v

This problem could be more widespread than just my system, as I don't see any way I could have done this myself. In fact, at one time I found something on this board about people whose mods wouldn't install correctly, and they had to manually move them. I can't find it now, but could this issue (if more widespread) be the root cause for those people as well?

Anyhow, thanks to both of you! I'll try this simple pair of changes, and my guess is that it will work. I'll post again when I have results. (It takes a while, because you only notice it after you have opened a few dozen goody huts and none of them came up "map" or "barb locations".)
 
It takes a while, because you only notice it after you have opened a few dozen goody huts and none of them came up "map" or "barb locations".)

Create a custom map where you start off next to like 20 goody huts to test it.
 
Create a custom map where you start off next to like 20 goody huts to test it.

OK, I'm getting confident that this mod is working now.

But, this one was just to test things out. The bigger mod I want is to allow more technologies (from later eras than "ancient") to be allowed. I haven't been able to confirm that it works yet; still trying.

But, I'll use a modified version of your suggestion: Simply start the game at a later era, but without any startup extras (i.e. still use a completely fogged map, so the initial phases are the same as an ancient one). This should allow me to get more chances at classical and later techs and see if it works.

Thanks for the idea!
 
Or just use FireTuner to place more as you open the previous ones. Improvement Plopper works just fine.

I'll try this. I haven't tried to figure out FireTuner yet, since I'm still blundering my way through the XML stuff.

Is there a guide for FireTuner? It doesn't appear to be covered in Kael's guide.
 
Two questions:
1. Have you done the 'OnModActivated' for the properties window?
2. How do you use FireTuner? :D

For #2, see above: I don't know how to use it.

For number 1, this could be an issue. I thought I read that one did not need to put anything here for activation, but Kael's guide says you do. However, he doesn't say HOW to do it; he just shows a picture.

I'll make a change to that end and see what happens. Hopefully I can figure it out, as the guide doesn't really tell you what to enter (it merely shows a picture).
 
Is there a guide for FireTuner? It doesn't appear to be covered in Kael's guide.

There's not much to explain. To enable FireTuner you just have to go into your configuration file and set EnableTuner=1 (it defaults to 0). Then, simply having FireTuner open lets it auto-sync up to whatever game you're currently running. It's very handy that way.

If you're just looking at normal in-game debugging, there are really only four tabs you'll use:
> The main tab. This mainly is used by the default game to print out all sorts of debug information when the game first starts up, along with any errors it runs into during a game. If you're writing custom Lua code, any print statements will come out here, so you'll spent 90% of your time in this tab.
It has a pulldown in the upper left that will say something like "Main Menu", giving the state it's currently locked to. I highly recommend setting this to "InGame" and clicking the Lock button next to it. InGame is the mode that allows you to type in Lua commands as if it were a standard console; you're limited to one line, but there's still a lot you can do with that. You'll still see all of the print statements, so I'm honestly not sure why this wasn't the default, but it's the only mode in which you can enter commands.
Side note: if you enter an invalid Lua command, it'll crash. Examples include looping over players and printing out something, without checking for invalid players first. So there are limitations on what you can type in.
> The Active Player tab. Used to grant techs, culture, and gold to yourself. You could do this using Lua commands in the first tab, but this is faster.
> The Map tab. The important things here are the Ploppers; if you want to place a new unit on the map, you just turn on the "Unit Plopper" box, make sure the right civ and unit type are selected, and click on the map. Poof, instant unit. There's one slight bit of strange behavior when you load a savegame, where you'll need to click back and forth a bit for it to reset (or just reset FireTuner's connection).
> The Selected Unit tab. If you've clicked on one of your units, you can change how much damage it's taken and how much experience it has, or give it an order. A bit limited in what you can do, but the XP part is useful when testing custom promotions and such.

The other tabs have uses (like the Table Browser), but the above four are the big ones. Most of the tabs are user-friendly; when you go to the Active Player tab and see "Gold: " followed by a text entry field, it's pretty obvious what it does.
 
Thanks!

Spatzimaus: I used FireTuner and was able to "plop" several goody huts down to test with. Worked GREAT! Thanks!

Unfortunately, the mod isn't working. Here's what I did:

First, I created a new mod. I added one file to the mod:

Code:
<GameData>
  <!-- TODO: Insert table creation example here. -->
 
  <!-- TODO: Insert table data example here.-->
  
  <!-- Enter your Game Data here. -->
	<HandicapInfo_Goodies>
		<Delete GoodyType="GOODY_MAP"/>
		<Delete GoodyType="GOODY_POPULATION"/>
		<Delete GoodyType="GOODY_CULTURE"/>
		<Delete GoodyType="GOODY_GOLD"/>
		<Delete GoodyType="GOODY_REVEAL_NEARBY_BARBS"/>
		<Delete GoodyType="GOODY_UPGRADE_UNIT"/>
	</HandicapInfo_Goodies>
  
</GameData>

Then I changed the properties and added two lines (two because I didn't know which one was the right one). Both lines are "OnModActivated" and "UpdateDatabase". Line one points to XML/GameInfo/CIV5GoodyHuts.xml and line 2 points to XML/GameInfo/CIV5HandicapInfos.xml.

I then did a Build followed by a Save All. Finally, I went in-game and activated the mod and started a new game.

Unfortunately, the first goody hut I tried gave me culture, so I know the mod isn't working.

Any ideas?
 
You need to point the onmodactivated and the update database to the name and relative path of the file you have your changes in.
 
Do you relative to <my documents>\my games\sid meier's civilization 5\mods?

Or, as above\GoodyAllowOnlyTechs? (that's the name of this test mod)

Interestingly, I now see (after reading your post) that there is no folder for this mod. So, I may have a pathing problem. Be right back ....
 
Interestingly, I now see (after reading your post) that there is no folder for this mod. So, I may have a pathing problem. Be right back ....

This is why I'd suggested attaching your mod to a post here. That sort of error is easy for us to spot, but if you're new at this it won't look wrong to you, and no amount of text will illustrate the problem to the rest of us.
 
OK, I had a typo in the mods list. I put "\MODS" at the end of the path under tools | options.

However, once corrected, while the mod showed up in the list, it still didn't work.

I'm trying to understand your (Kasdar's) term "relative path". In Kael's guide, the illustration shows them in the form "XML/foldername/filename", where foldername and filename are elements in the path of (apparently) the original game files. So, I'll need a reply to my question pair in the previous post before I can continue.

Thanks!
 
where foldername and filename are elements in the path of (apparently) the original game files.

This is your problem.

For XML, the original files DO NOT MATTER. You could name a file Bob.xml and stick it in a XML/Stuff/ subdirectory, and as long as the OnModActivated has the correct path and filename to THAT FILE (XML/Stuff/Bob.xml), it will work.
Paths are relative to the core directory of that mod. If you haven't created subdirectories in the mod, you don't declare any paths.
The original file structure does not matter AT ALL for GameData. For Lua and non-gamedata XML you have to name the files the same thing as in the vanilla game, but paths can be whatever you want.

Again, this is why you post your file when asking a question. Or at least post the .modinfo file, which'd make it immediately obvious what the problem was.
 
This is your problem.

For XML, the original files DO NOT MATTER. You could name a file Bob.xml and stick it in a XML/Stuff/ subdirectory, and as long as the OnModActivated has the correct path and filename to THAT FILE (XML/Stuff/Bob.xml), it will work.
Paths are relative to the core directory of that mod. If you haven't created subdirectories in the mod, you don't declare any paths.
The original file structure does not matter AT ALL for GameData. For Lua and non-gamedata XML you have to name the files the same thing as in the vanilla game, but paths can be whatever you want.

Again, this is why you post your file when asking a question. Or at least post the .modinfo file, which'd make it immediately obvious what the problem was.

OK, I think I fixed that problem and got it to work. However, now there's another issue. (I'll post the contents of the two files I have below.) Recall that this mod's purpose is simple to force all goody hut values to be technologies. What actually happens is nothing. It appears the system thinks for a bit, but then nothing happens. I don't get a tech, nor do I get anything else.

Here is the GoodyAllowOnlyTechs (v 1).modinfo file:

Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="34aa33e9-3013-4d5e-870f-5d2af2075434" version="1">
  <Properties>
    <Name>GoodyAllowOnlyTechs</Name>
    <Stability>Alpha</Stability>
    <Teaser>Allow only technologies to be obtained from goody huts. This is for testing whether a basic mod works.</Teaser>
    <Description>Allow only technologies to be obtained from goody huts. This is for testing whether a basic mod works.</Description>
    <Authors>Gersetich</Authors>
    <HideSetupGame>0</HideSetupGame>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsMac>1</SupportsMac>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadStrategicViewSystem>0</ReloadStrategicViewSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
  </Properties>
  <Dependencies />
  <References />
  <Blocks />
  <Files>
    <File md5="A024C2C6939F6598F48A5CD45552F401" import="0">DisallowedGoodyOptions.xml</File>
  </Files>
  <Actions>
    <OnModActivated>
      <UpdateDatabase>DisallowedGoodyOptions.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
</Mod>

and here is the other file, DisallowedGoodyOptions.xml:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 5/25/2011 12:08:23 PM -->
<GameData>
  <!-- TODO: Insert table creation example here. -->
 
  <!-- TODO: Insert table data example here.-->
  
  <!-- Enter your Game Data here. -->
	<HandicapInfo_Goodies>
		<Delete GoodyType="GOODY_MAP"/>
		<Delete GoodyType="GOODY_POPULATION"/>
		<Delete GoodyType="GOODY_CULTURE"/>
		<Delete GoodyType="GOODY_GOLD"/>
		<Delete GoodyType="GOODY_REVEAL_NEARBY_BARBS"/>
		<Delete GoodyType="GOODY_UPGRADE_UNIT"/>
	</HandicapInfo_Goodies>
  
</GameData>

NOTE: I'm playing a basic game, with no other mods and no advanced setup options. The basic options I chose are Napoleon, Terra map, Standard size, Prince difficulty, and Quick game.
 
if you want to change what goody huts give you might want to change the values found in the Civ5GoodyHuts.xml file. I think the game is checking to see what you get but doesnt have enough options.
 
Back
Top Bottom