1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Am interested in modding VP; where do I start?

Discussion in 'Community Patch Project' started by Arkatakor, Feb 6, 2017.

Tags:
  1. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    I would like to make a modmod of VP. I will be focusing on modifying the techs in the ancient era based on an existing mod.

    I will need to override some of the definitions in VP such as when resources become visible and which techs are depended on which, etc. I dont see a need to modify the DLL as I will simply be adding new techs / buildings and modifying existing techs and their dependencies.

    Whats the best way to do this?
     
  2. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,124
    Location:
    The Kingdom of New Zealand
    Do you have experience with modding? The best way would be to take a look at an existing mod to see how it works.

    You'll need to add a dependancy in your mod to the CBO, and then use the UPDATE statement to change the right tables. As an example:

    Code:
    UPDATE Resources
    SET TechReveal = 'TECH_TRAPPING' -- change TRAPPING to whatever tech you want, or the entire 'TECH_TRAPPING' statement to null to have this resource always visible
    WHERE Type = 'RESOURCE_DEER' -- change DEER to whatever resource you want to change.
    AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_RESOURCE_REVEAL' AND Value= 1);
    
     
    vyyt likes this.
  3. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    Yes I have experience in modding, I created the mod that I referenced in the OP. So what you are saying is if I declare my mod as dependent on another mod, I can freely override the DB changes in the parent mod with my own DB changes without any conflict? The important thing is that I know that my db changes take precedence over the parent mod db changes.

    EDIT: looking closer at your post it seems that the following SQL does exactly what i'm getting at:

    AND EXISTS (SELECT * FROM COMMUNITY WHERE Type='COMMUNITY_CORE_BALANCE_RESOURCE_REVEAL' AND Value= 1)

    If I understand the above correctly it takes what already exists and modifies it.
     
  4. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,124
    Location:
    The Kingdom of New Zealand
    Yes, when you make a dependancy, this means that the mod on which your mod depends is loaded first. That way, adjustments you make take precedence in the database as yours will be loaded afterwards. You can make a reference to achieve the same thing, but a reference does not require the referenced mod, which I don't think will be relevant for you.

    The code I posted will change the tech that reveals a specific resource. The AND EXISTS statement is a setting check used internally by the CBO to make sure that a user has the feature of revealing resources by tech enabled. This might not be needed for you if you don't plan to release your mod publicy, but otherwise, it means that, if a user has no tech requirements for revealing resources, your changes will be ignored.
     
  5. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    Thanks for the clarification. So the next question I have is, how do I actually create the mod dependency?
     
  6. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,124
    Location:
    The Kingdom of New Zealand
    In Modbuddy, right-click your project name and choose Properties (as you would to add files to the database), choose Associations in the left-hand panel that popps up, and the first block should be called "Dependencies." There, you can click "Add Mod" and input the CBO's title and ID, which are as follows:

    Code:
    (2) Community Balance Overhaul
    8411a7a8-dad3-4622-a18e-fcc18324c799
    
     
  7. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    Thanks again for the input - very much appreciate it. Over the next few need to spend some time going over both my tech tree and VP's tech tree and how best to merge them whilst making sure I don't break the VP balance. Once i'm done with that i'll begin the merge.
     
  8. Funak

    Funak Deity

    Joined:
    Jul 15, 2013
    Messages:
    9,127
    You guys are both so cool for working this hard on stuff, just wanted you to know.

    As far as your mod, I can see this being a great addition to vanilla, the vanilla tech-tree generally being somewhat of a mess, but do you really think such an expansion is really necessary for VP? I mean the Ancient era techs are already heavily modified and far more heavily linked together than they were in vanilla.
    Anyways if you're going through with this I figured I'd give you some general thoughts on it, or at least some things that I think it would be helpful for you to consider.
    First of all, VP changes how resources are unlocked, having them show up on the first tier of techs instead of just being visible from the start (might be some clashing if you move techs around).
    Second, VP have settlers moved to pottery, this doesn't necessarily mean that much of a settler delay in general, but if pottery isn't a first tier tech in your mod, you're going to be forced to pretty specific tech-paths.
    Lumbermills and marsh-clearing have been moved quite a bit as well, and keeping them where they currently are would probably be a decent balance-decision, at least consider it.
    Most resource-improvements unlocks on either tier 1 or tier 2 techs(with all tier 2 techs having either 1 or 2 pre-reqs), this is a conscious balance-decision based on existing pantheons as well as the new happiness system, exception to this is resources that are stuck under features (forest/jungle/marsh), they are in general unlocked later and most of them are tuned to provide an early-game advantage to compensate (and there is the herbalist building to further improve them prior to chopping)
    Masonry and Construction got their names flipped (still not exactly sure why, but that's how we roll) and Sailing/Writing are both classical era techs now.

    Don't take this as me trying to shut your creativity down, I'm just trying to be helpful. Also if you're talking about just the base part of VP (not the overhaul-patch) I think everything I just said is invalid and you can just ignore it :D.

    Either way, good luck with your project.
     
  9. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    You do make some interesting points and I appreciate your advice considering that VP is designed differently from vanilla Civ. That said I have played Vanilla Civ 5 extensively without and with my mod, and have now put in a good couple of weeks of game time with VP.

    VP is overall a great improvement over Vanilla civ, particularly the social policy trees and wonders. That being said I find that VP faces the same issues when it comes to balancing out early access to resources as vanilla Civ despite people here claiming the contrary. I'll give a few examples:

    Have 2 wheats next to your capitial? Like vanilla civ you can not only see them from the getgo (which I don't have a problem with), but you dont even have to research a tech to improve it. Have 2 fish instead? You are even worse off than in Vanllia because you can't even see if there are fish next to your capital and the tech to improve them is way off. This may be ok on lower difficulty levels but on immortal and above, spawning next to a capital where you have early access to resources is an absolute must.

    This brings me to my next point; in my mod as well as civ4 and civ5 for that matter, all food resources are visible from the getgo (in the real world you dont need a technology to see if an animal is in front of you). By having all food visible from the start the player knows what to research. On higher difficulty levels you can't afford to research techs just to see if your city has an associated resource next to it. Agriculture should not be given a free ride either. While wheat should be visible from the getgo (as it is now) the agriculture tech should be researchable just like any other and Civ 5 vanilla is definitely guilty of this. I don't mean to appear like i'm slamming VP, i'm not, rather I am slamming vanilla Civ 5 which VP is based on. Its because VP is that great that i'm actually taking the time to look into modding it.

    I understand that there will be balance repurcussions nonetheless taking into how VP is designed. Thats why I carefully need to analyze VP's tech tree and make sure that I integrate my changes as best I can without compromising the gameplay of VP too much. For example I might need to make stonehenge require 2 policies instead of 1. Or I might move stonehenge to mysticism (tier 1 tech). Its going to take some experimentation and me playing my mod quite a few times before I consider it ready for release, if that ever happens. I understand that its no trivial task and might not even pull it off.

    If I do decide to go through with this mod, out of respect I won't advertise it here (unless people feel i'm permitted to do so), rather i'll upload it on steam and give Gazebo a link to it via private message once I feel its done and he can see for himself if he wants to try it out and integrate parts of it into main VP or not. If he does not it won't matter to me either way as i'll be content to play it myself. Thats my philosphy behind modding; make something that YOU enjoy and if others enjoy it also then great. If they don't they can play differently. Choice has never been a bad thing in my experience :)
     
    Last edited: Feb 7, 2017
  10. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,022
    Gender:
    Male
    Location:
    Little Rock
    There's a subforum for modmods, I recommend posting your project there.

    G
     
  11. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    7,243
    Location:
    Malaga (Spain)
    I don't see an issue with being able to farm from turn 0. First you need workers, which can take its time. Second you'll spend quite a few turns just for 1 extra food, maybe two. Getting luxuries seems more important. By the time you are actually improving tiles, you'll have some techs ready. And it's not that you don't know what is going to spawn : fish in seas, horses on plains, bananas on jungles.
     
  12. Funak

    Funak Deity

    Joined:
    Jul 15, 2013
    Messages:
    9,127
    I think you misunderstood me, no one here has any problem with you advertising a modmod (but as G said, there is a subforum dedicated to that, so keeping the project in there is probably the way to go). Naturally if your advertisement is all based around negativity (not how good your solution is, but how bad the existing system is) the forum-mods might shut you down because of that, but you really don't seem like that kind of person so I'm not really worried about it.

    As far as your point about hidden resources, there is an option in VP to reveal all bonus resources from the start (you can also hide luxuries as well/instead of bonus resources, or any combination of the two), the current option for hidden bonus-resources is mostly there because people enjoyed it.

    Anyways, good luck with you project and don't hesitate to ask for help if you need it, we are all friendly people here, and some of us even knows how modding works (I sure don't, but it seems like others do :D)
     
    tu_79 likes this.
  13. Arkatakor

    Arkatakor King

    Joined:
    Mar 11, 2006
    Messages:
    612
    Gender:
    Male
    Location:
    Stockholm, Sweden
    Sorry for the late response;

    Thanks for the feedback and clarifications guys - If my modmod ever comes to light I will post it in the subforum as recommended here. In the meanwhile I will be posting in here if I have further technical questions on getting started.
     
  14. Funak

    Funak Deity

    Joined:
    Jul 15, 2013
    Messages:
    9,127
    You could ask a mod to move this thread there.
     
  15. meRlinX_AT

    meRlinX_AT JustMe

    Joined:
    Jan 19, 2015
    Messages:
    161
    Location:
    Earth
    hi,
    from my experience with modding CP/VP to my personal needs is
    - never make a update from existing entrys like yields or modifiers
    --> delete/set default the existing and add your own
    this way its also compatible after things in CP/VP are changed (which you will not really notice)

    Greetz
    M
     

Share This Page