Forum index VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
SoD files mod like
Author Message
Macron1 

Joined: 02 Apr 2013
Posts: 576
Posted: 2013-09-19, 11:58   

"campaigns or 32 bit will be needed at that time"

So Unicode also.
I proposed earlier easy way to turn off standard towns. But it was rejected.
I think if we just turn off standard towns, then they will be accessed through mods.
And everyone will be happy.
PS So there will be no need to clean up hardcoded standard towns stuff right now.
_________________
I'm not a member of VCMI developer group and my posts are not official. I'm just a fan.
 
     
Ivan 
VCMI programmer

Age: 25
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 2013-09-19, 12:18   

krs,
Campaigns - one of biggest missing features for H3, requested a lot by players who are not interested in mods.
unicode support/i18n - needed for better support for localized versions of H3. Including mods. Right now it is impossible to (for example) install Russian mod into Polish version of H3.
launcher - needs some internal improvements, probably smallest feature from this list.
32-bit graphics - SDL 2.0 or not code majority of code that assumes that all images are 8-bit still needs rewrite/fixes, most notably - battles.

There would never be a single opinion on what feature should have highest priority - you want submods, some H3 players want campaigns, artists want 32 bit, on bugtracker there is request for unicode from Chinese players.
Quote:
I proposed earlier easy way to turn off standard towns. But it was rejected.

How many times I should repeat this: implementing even "special" field is far from trivial. Simplest example: random town was set to Castle or Rampart in editor. Now you made this factions "special". How such situation should be resolved? This is most trivial example that I can think of even without looking in code.
If somebody will make bug-free patch that implement this then I'll commit it. But othervice I'm not interested in working on this feature at this point.
 
     
Macron1 

Joined: 02 Apr 2013
Posts: 576
Posted: 2013-09-19, 12:43   

Ivan wrote:
Simplest example: random town was set to Castle or Rampart in editor. Now you made this factions "special". How such situation should be resolved? This is most trivial example that I can think of even without looking in code.

As I said earlier, if town is written in editor, it must stay as placed. So are creatures.
There is no change.
Only change for "special" - is that town is not proposed to choose on game options selection, and not placed on map, if random town without limitation is there.
Submods will not change this behavior (as I understand Krs). Creatures, heroes and towns will be named the same.
_________________
I'm not a member of VCMI developer group and my posts are not official. I'm just a fan.
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2013-11-30, 09:17   

Winter is coming, so is free time. How is the progress/mood on sub-mod support?
 
     
Ivan 
VCMI programmer

Age: 25
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 2013-12-01, 12:01   

Right now I'm finishing another feature: https://dl.dropboxusercontent.com/u/22372764/vcmi/logExpBuildingRequirements.png

As for what to do next - either submods or victory conditions for campaigns.

For campaigns - base system is already mostly done & tested as part of extended building requirements so implementing campaigns is a logical continuation.

For submods - recently I made some changes that should make implementing submods easier. I'll take a closer look on this - if there won't be any unexpected obstacles then it should be possible to implement them as next feature.
 
     
beegee 
VCMI programmer

Joined: 12 Dec 2009
Posts: 247
Location: Stuttgart, Germany
Posted: 2013-12-01, 13:17   

I would vote for campaigns. IMO campaigns have higher prio than submods.
 
     
Ivan 
VCMI programmer

Age: 25
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 2013-12-01, 13:55   

I do agree with you but these features also have different scale.

If there won't be any any blocking issues then submods support should be really simple:
- add recursive search for mods
- generate correct, non-conflicting mod ID's
- make launcher understands these changes
And that's all.

But campaigns are much more complex. Right now I am only interested in missing victory conditions. This still leaves at least this missing feature: http://bugs.vcmi.eu/view.php?id=1597 Not sure if I can implement it in "right" way - too much client-server interaction to my liking.
Delaying it will also give me some time to properly test logic expressions in something less critical than victory conditions.
 
     
beegee 
VCMI programmer

Joined: 12 Dec 2009
Posts: 247
Location: Stuttgart, Germany
Posted: 2013-12-01, 15:04   

That's fine, if adding submods support is a easy task for you, then do it first. When logic expressions are tested properly, you can integrate it in special victory/loss conditions as you said. Perhaps Tow/Tow dragon can give some advices how to solve the "heroes are not moving to next scenario" problem in the "right" way.
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2013-12-01, 16:54   

Submod support imo make a lot more sense than campaigns for many reasons. Here some that spring to mind.

- There will be changes to the mod structure and the less mods impacted the better.
- There are a lot more mod makers than campaign one so the sooner they have a final/stable system also the better.
- There will be lots of code changes and it makes sense to have them as soon as possible to have them tested and to spare the double work at fixing bugs.

EDIT:
I found a reason for campaign support also. A new HotA release! But that is a mod so...
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2013-12-31, 10:44   

I have updated the .json to match the latest changes in svn.

Any eta on submod support?

SoD_as_Mod.zip
Download 111 Time(s) 452.66 KB

 
     
Ivan 
VCMI programmer

Age: 25
Joined: 08 May 2009
Posts: 1438
Location: Ukraine
Posted: 2013-12-31, 13:07   

In 2014? I would like submods for several ideas of my own (like translations) but last time I tried to implement them I ran into some issues during implementation of recursive mod search. Nothing critical but it turned out to be a bit more complicated than I expected it to be.

BTW - maybe you should try to implement this as a huge number of "normal" mods? Submods should behave identically to normal mods except for hidden(?) dependency on parent.
_________________
Send PM if there is something that needs my attention.
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2013-12-31, 15:38   

If I would have known it will take so long, I would have done it like you've suggested, but now I think I keep waiting for submods support :D.

One of the big points of this SoD mod is having everything nicely ordered in subfolders (configs and resources). And this I do not see possible without changes to the current modding system.

Will check again in 2014 :)
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2017-01-30, 18:51   

I want to serialize "core" data into a json file. All data, creatures, artifacts, factions... etc. And I need it to be complete (heoriginal merged with "core mode")

Code:
bool CContentHandler::ContentTypeHandler::loadMod(std::string modName, bool validate)
{
    ModInfo & modInfo = modData[modName];
    bool result = true;

    auto performValidate = [&,this](JsonNode & data, const std::string & name){
        handler->beforeValidate(data);
        if (validate)
            result &= JsonUtils::validate(data, "vcmi:" + objectName, name);
    };

    // apply patches
    if (!modInfo.patches.isNull())
        JsonUtils::merge(modInfo.modData, modInfo.patches);

    for(auto & entry : modInfo.modData.Struct())
    {
        const std::string & name = entry.first;
        JsonNode & data = entry.second;

        if (vstd::contains(data.Struct(), "index") && !data["index"].isNull())
        {
            // try to add H3 object data
            size_t index = data["index"].Float();

            if (originalData.size() > index)
            {
                JsonUtils::merge(originalData[index], data);

                performValidate(originalData[index],name);
                handler->loadObject(modName, name, originalData[index], index);

                originalData[index].clear(); // do not use same data twice (same ID)

------------------>     logGlobal->traceStream() << "\n" << originalData[index];

                continue;
            }
        }
        // normal new object or one with index bigger that data size
        performValidate(data,name);
        handler->loadObject(modName, name, data);
    }
    return result;
}


I try to do that like the line above
Code:
logGlobal->traceStream() << "\n" << originalData[index];

and it does not work.

Is this the right place? Can i do it this way?
 
     
Warmonger 
VCMI programmer


Age: 27
Joined: 07 Jun 2008
Posts: 1530
Location: Warsaw, Poland
Posted: 2017-01-30, 18:57   

Code:

originalData[index].clear(); // do not use same data twice (same ID)
logGlobal->traceStream() << "\n" << originalData[index];

Surely passing cleared objects won't work ;-)
_________________
Think twice if you really need to send me private message. Use public forum for general questions.
DJ Warmonger blog
beegee wrote:
Warmonger, you are the best!
 
 
     
krs


Joined: 04 Sep 2012
Posts: 374
Posted: 2017-01-30, 19:06   

noooooooooooo :->
 
     
Display posts from previous:   
Reply to topic
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
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group
Template Chronicles modified by Nasedo modified by Tow.
© VCMI Team
Page generated in 0.08 second. SQL queries: 15