Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 3.5 - WoG and Beyond > Thread: Official VCMI Thread
Thread: Official VCMI Thread This Popular Thread is 116 pages long: 1 10 20 30 40 50 60 70 80 90 ... 92 93 94 95 96 ... 100 110 116 · «PREV / NEXT»
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 22, 2018 05:16 PM

Im making some abilities and encountered a annoying problem.
"How can i refer a object from another mod loading too with launcher?"

Example: hota ported cove is a mod. Im making a abilitie to affect some creatures created in cove. That creature not exists in "creature.{name}" default config object. So, how i can refer that creature ? Something like "cove.{name}" or similar structure ?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 22, 2018 06:10 PM

Yes, look what was done in Tarnum part 2 mod.
In your mod.json you must type:

"depends" : ["hota.cove"],

where 'hota' is mod your are want to reffer for, and 'cove' is a submod.
So having such code - player must enable hota.cove together with your mod and all configured jsons from hota.cove are know to your mod.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 22, 2018 06:25 PM

avatar said:
Yes, look what was done in Tarnum part 2 mod.
In your mod.json you must type:

"depends" : ["hota.cove"],

where 'hota' is mod your are want to reffer for, and 'cove' is a submod.
So having such code - player must enable hota.cove together with your mod and all configured jsons from hota.cove are know to your mod.


Thanks for that

Just another thing. Im making too animations for defs, but "def maker" crash every time generating .def. Anyone, know another option for create the .def file ? I already have the sequence images

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 22, 2018 07:37 PM

Choose bettet software.Get def tool: https://sites.google.com/site/sergroj/wog#TOC-Def-Tool-v3.4.1
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 23, 2018 06:23 PM

avatar said:
Choose bettet software.Get def tool: https://sites.google.com/site/sergroj/wog#TOC-Def-Tool-v3.4.1


Used Def tool. Way better than others. Thanks

Now, my first .def



Used a spritesheet taken from web with 7 poses. Dismembered the body parts and made each sprite 300% bigger than in game combining e creating parts in photoshop. Resized, eliminated semi-transparent pixels and finished the def with Def tool. Take a lot of time, but still worty learning how do somethings in each phase.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 23, 2018 06:57 PM

Hard to say with such small frame, but it seems you are using old 0.99 vcmi version without black color supporting. I advise to dowload fresh, latest daily builds.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 23, 2018 07:30 PM

avatar said:
Hard to say with such small frame, but it seems you are using old 0.99 vcmi version without black color supporting. I advise to dowload fresh, latest daily builds.


I couldnt undesrtand why some pixels were not rendering. Download daily build and worked


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
planetavril
planetavril


Famous Hero
posted January 24, 2018 01:30 PM
Edited by planetavril at 13:31, 24 Jan 2018.

how to add personalized cheats?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 24, 2018 01:48 PM

Impossible without C++ knowledge.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
planetavril
planetavril


Famous Hero
posted January 24, 2018 02:10 PM
Edited by planetavril at 14:13, 24 Jan 2018.

avatar said:
Impossible without C++ knowledge.

I added on cgame handler
but I do not know how to add that the code added dragon fairies
so the code is inserted there, but it does not do anything

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dydzio
dydzio


Adventuring Hero
VCMI contributor
posted January 24, 2018 02:23 PM
Edited by dydzio at 14:32, 24 Jan 2018.

Check how vcmiglaurung code is implemented

else if (cheat == "vcmiainur" || cheat == "vcmiangband" || cheat == "vcmiglaurung")
{
if (!hero) return;
///Gives N creatures into each slot
std::map<std::string, std:air<int, int>> creatures;
creatures.insert(std::make_pair("vcmiainur", std::make_pair(13, 5))); //5 archangels
creatures.insert(std::make_pair("vcmiangband", std::make_pair(66, 10))); //10 black knights
creatures.insert(std::make_pair("vcmiglaurung", std::make_pair(133, 5000))); //5000 crystal dragons

const CCreature * creature = VLC->creh->creatures.at(creatures[cheat].first);
for (int i = 0; i < GameConstants::ARMY_SIZE; i++)
if (!hero->hasStackAtSlot(SlotID(i)))
insertNewStack(StackLocation(hero, SlotID(i)), creature, creatures[cheat].second);
}

This is from CGameHandler.cpp, as you can see there is condition for each creature cheat code at beginning and std::make_pair defined after that for creature ID and count. Extend this code. If you need further help let me know.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
planetavril
planetavril


Famous Hero
posted January 24, 2018 10:26 PM

I can not find the piece of code you wrote,
there is only || vcmi armenelos, || vcmi nahar etc.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
planetavril
planetavril


Famous Hero
posted January 24, 2018 10:28 PM

void CGameHandler:layerMessage(PlayerColor player, const std::string &message, ObjectInstanceID currObj)
{
bool cheated = true;
PlayerMessage temp_message(player, message, ObjectInstanceID(-1)); // don't inform other client on selected object
sendAndApply(&temp_message);

std::vector<std::string> cheat;
boost::split(cheat, message, boost::is_any_of(" "));
int obj = 0;
if (cheat.size() == 2)
{
obj = std::atoi(cheat[1].c_str());
if (obj)
currObj = ObjectInstanceID(obj);
}

const CGHeroInstance * hero = getHero(currObj);
const CGTownInstance * town = getTown(currObj);
if (!town && hero)
town = hero->visitedTown;

if (cheat.size() == 1 || obj)
handleCheatCode(cheat[0], player, hero, town, cheated);
else
{
for (const auto & i : gs->players)
{
if (i.first == PlayerColor::NEUTRAL)
continue;
if (cheat[1] == "ai")
{
if (i.second.human)
continue;
}
else if (cheat[1] != "all" && cheat[1] != i.first.getStr())
continue;

if (cheat[0]== "vcmiformenos" || cheat[0] == "vcmieagles" || cheat[0] == "vcmiungoliant")
{
handleCheatCode(cheat[0], i.first, nullptr, nullptr, cheated);
}
else if (cheat[0] == "vcmiarmenelos")
{
for (const auto & t : i.second.towns)
{
handleCheatCode(cheat[0], i.first, nullptr, t, cheated);
}
}
else
{
for (const auto & h : i.second.heroes)
{
handleCheatCode(cheat[0], i.first, h, nullptr, cheated);
}
}
}
}

if (cheated)
{
SystemMessage temp_message(VLC->generaltexth->allTexts.at(260));
sendAndApply(&temp_message);

if(!player.isSpectator())
checkVictoryLossConditionsForPlayer(player);//Player enter win code or got required artcreature
}
}

bool CGameHandler::makeCustomAction(BattleAction &ba)
{
switch(ba.actionType)
{
case Battle::HERO_SPELL:
{
COMPLAIN_RET_FALSE_IF(ba.side > 1, "Side must be 0 or 1!");

const CGHeroInstance *h = gs->curB->battleGetFightingHero(ba.side);
COMPLAIN_RET_FALSE_IF((!h), "Wrong caster!");

const CSpell * s = SpellID(ba.additionalInfo).toSpell();
if (!s)
{
logGlobal->error("Wrong spell id (%d)!", ba.additionalInfo);
return false;
}

BattleSpellCastParameters parameters(gs->curB, h, s);
parameters.aimToHex(ba.destinationTile);//todo: allow multiple destinations
parameters.mode = ECastingMode::HERO_CASTING;
if (ba.selectedStack >= 0)
parameters.aimToStack(gs->curB->battleGetStackByID(ba.selectedStack, false));

ESpellCastProblem::ESpellCastProblem escp = s->canBeCast(gs->curB, ECastingMode::HERO_CASTING, h);//todo: should we check aimed cast?
if (escp != ESpellCastProblem:K)
{
logGlobal->warn("Spell cannot be cast! Problem: %d", escp);
return false;
}

StartAction start_action(ba);
sendAndApply(&start_action); //start spell casting

parameters.cast(spellEnv);

sendAndApply(&end_action);
if (!gs->curB->battleGetStackByID(gs->curB->activeStack))
{
battleMadeAction.setn(true);
}
checkBattleStateChanges();
if (battleResult.get())
{
battleMadeAction.setn(true);
//battle will be ended by startBattle function
//endBattle(gs->curB->tile, gs->curB->heroes[0], gs->curB->heroes[1]);
}

return true;

}
}
return false;
}


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 25, 2018 04:08 AM

Sharing the link with preview to creatures made until now: here!

Currently making new .defs

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
planetavril
planetavril


Famous Hero
posted January 25, 2018 08:03 AM

some creatures of the photos had already been created

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 25, 2018 08:19 AM

Sneak-peak of your creatures is fine, but like planetavril said it  - some defs-creatures are well known to players as part of many new town line-ups. That's why mixing various mods could be confusing: for example  when you encounter Fairy Bears on map, you'll never know if these are bears from Preserve mod or from your mod and what abilities they have. Of course it's minor issue but keep in mond that player almost always wants to have new creatures as part of town line-up than 'standalone' ones
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 25, 2018 04:50 PM

planetavril said:
some creatures of the photos had already been created


avatar said:
Sneak-peak of your creatures is fine, but like planetavril said it  - some defs-creatures are well known to players as part of many new town line-ups. That's why mixing various mods could be confusing: for example  when you encounter Fairy Bears on map, you'll never know if these are bears from Preserve mod or from your mod and what abilities they have. Of course it's minor issue but keep in mond that player almost always wants to have new creatures as part of town line-up than 'standalone' ones


I understand yours concerns about mixings ideas. But im making the mods for personal use, and i like to share. Gonna set 'conflicts' with town mods and others mods using same creatures than mines or objects to avoid that situation you talked about.

Yet im going for new town in a future, but for now i have a least 15 creatures to animate e make the .defs, just take time to make each one.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
avatar
avatar


Promising
Supreme Hero
posted January 25, 2018 07:37 PM

fiorin said:

Gonna set 'conflicts' with town mods and others mods using same creatures than mines or objects to avoid that situation you talked about.

No need to set conflicts in these cases. For vcmi engine "preserveFairyBear" and "fiorinFairyBear" are two diffirent creatures. I just want you to know that mods with new towns are more more more popular than mods with standalone set of monsters I've made one of such set and its popularity is 10 times lesser that any fan made town ;] So if you feel enough skilled, better option is to make a completelly new town. You can talk with acidchalk - he's talented guy and works on few townscreens at once ;]

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
fiorin
fiorin


Promising
Famous Hero
☠️
posted January 25, 2018 08:30 PM

avatar said:
fiorin said:

Gonna set 'conflicts' with town mods and others mods using same creatures than mines or objects to avoid that situation you talked about.

No need to set conflicts in these cases. For vcmi engine "preserveFairyBear" and "fiorinFairyBear" are two diffirent creatures. I just want you to know that mods with new towns are more more more popular than mods with standalone set of monsters I've made one of such set and its popularity is 10 times lesser that any fan made town ;] So if you feel enough skilled, better option is to make a completelly new town. You can talk with acidchalk - he's talented guy and works on few townscreens at once ;]



Gonna rework my mod then to make possible enable, heroes packs and each creature via launcher.

Gonna read now about towns and make one to test. If i need help, I talk do acidchalk. Thanks

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Macron1
Macron1


Supreme Hero
posted January 26, 2018 06:37 AM

fiorin said:

Gonna rework my mod then to make possible enable, heroes packs and each creature via launcher.

Gonna read now about towns and make one to test. If i need help, I talk do acidchalk. Thanks


It's a good thing that you can create new creatures from sprites parts. It's most interesting of your abilities. It will be great, if you will continue to add totally new DEFs to your mods. New creatures graphics is most rare part of modding.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 116 pages long: 1 10 20 30 40 50 60 70 80 90 ... 92 93 94 95 96 ... 100 110 116 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.1540 seconds