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 ... 75 76 77 78 79 ... 80 90 100 110 116 · «PREV / NEXT»
Warmonger
Warmonger


Promising
Legendary Hero
fallen artist
posted April 23, 2016 08:32 AM
Edited by Warmonger at 08:33, 23 Apr 2016.

Quote:
Making the code for displaying units order in battle was difficult? I just realised that in ERM this is quite impossible task.

That's because ERM was not made for complex widgets and algorithms

Can't now even tell who is the author of Stack Queue. In the past there were some issues, but it's all about good project design.
____________
The future of Heroes 3 is here!

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


Admirable
Omnipresent Hero
Wog refugee
posted April 23, 2016 11:40 AM

Where can we consult this queue code?

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


Promising
Legendary Hero
fallen artist
posted April 23, 2016 12:24 PM
Edited by Warmonger at 12:24, 23 Apr 2016.

The GUI code is here.
The actual queue calculation is here.

Also, queue->update() is called in a few different placed in battle mechanics (construction, stack removed, stack activated, battle action started, battle action ended).
____________
The future of Heroes 3 is here!

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


Admirable
Omnipresent Hero
Wog refugee
posted April 23, 2016 01:07 PM

Thanks for link.

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


Hired Hero
posted April 24, 2016 08:44 PM

Salamandre said:
Making the code for displaying units order in battle was difficult? I just realised that in ERM this is quite impossible task.


Such comparison does not make any sense. The design is completely different.

Here is code from VCMI, How it can help you to implement this with ERM?

Quote:

void CStackQueue::update()
{
stacksSorted.clear();
owner->getCurrentPlayerInterface()->cb->battleGetStackQueue(stacksSorted, stackBoxes.size());
if(stacksSorted.size())
{
for (int i = 0; i < stackBoxes.size() ; i++)
{
stackBoxes->setStack(stacksSorted);
}
}
else
{
//no stacks on battlefield... what to do with queue?
}
}

CStackQueue::CStackQueue(bool Embedded, CBattleInterface * _owner)
:embedded(Embedded), owner(_owner)
{
OBJ_CONSTRUCTION_CAPTURING_ALL;
if(embedded)
{
bg = nullptr;
pos.w = QUEUE_SIZE * 37;
pos.h = 46;
pos.x = screen->w/2 - pos.w/2;
pos.y = (screen->h - 600)/2 + 10;
}
else
{
bg = BitmapHandler::loadBitmap("DIBOXBCK");
pos.w = 800;
pos.h = 85;
}

stackBoxes.resize(QUEUE_SIZE);
for (int i = 0; i < stackBoxes.size(); i++)
{
stackBoxes = new StackBox(embedded);
stackBoxes->moveBy(Point(1 + (embedded ? 36 : 80)*i, 0));
}
}

CStackQueue::~CStackQueue()
{
SDL_FreeSurface(bg);
}

void CStackQueue::showAll(SDL_Surface * to)
{
blitBg(to);

CIntObject::showAll(to);
}

void CStackQueue::blitBg( SDL_Surface * to )
{
if(bg)
{
SDL_SetClipRect(to, &pos);
CSDL_Ext::fillTexture(to, bg);
SDL_SetClipRect(to, nullptr);
}
}

void CStackQueue::StackBox::showAll(SDL_Surface * to)
{
assert(stack);
bg->colorize(stack->owner);
CIntObject::showAll(to);

if(small)
printAtMiddleLoc(makeNumberShort(stack->count), pos.w/2, pos.h - 7, FONT_SMALL, Colors::WHITE, to);
else
printAtMiddleLoc(makeNumberShort(stack->count), pos.w/2, pos.h - 8, FONT_MEDIUM, Colors::WHITE, to);
}

void CStackQueue::StackBox::setStack( const CStack *stack )
{
this->stack = stack;
assert(stack);
icon->setFrame(stack->getCreature()->iconIndex);
}

CStackQueue::StackBox::StackBox(bool small):
   stack(nullptr),
   small(small)
{
OBJ_CONSTRUCTION_CAPTURING_ALL;
bg = new CPicture(small ? "StackQueueSmall" : "StackQueueLarge" );

if (small)
{
icon = new CAnimImage("CPRSMALL", 0, 0, 5, 2);
}
else
icon = new CAnimImage("TWCRPORT", 0, 0, 9, 1);

pos.w = bg->pos.w;
pos.h = bg->pos.h;
}


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


Admirable
Omnipresent Hero
Wog refugee
posted April 24, 2016 08:56 PM
Edited by Salamandre at 21:06, 24 Apr 2016.

It makes sense for me to see it properly done, thanks.

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


Promising
Legendary Hero
fallen artist
posted April 25, 2016 07:49 AM

Well, this is simply taking bitmaps and bliting them in correct positions.

The more interesting part is stack order calculation, however that other part is not the clearest code I've seen in my life.
____________
The future of Heroes 3 is here!

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


Known Hero
Derusticated
posted April 25, 2016 03:10 PM

Hi, I'm just starting to figure the basics of VCMI out. Is there any way to stop it from putting files in the My Documents folder on the system drive? I really don't want to sift through there.
____________
In the darkness, a blind man is the best guide; in an age of madness, look to the madman to lead the way.

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


Admirable
Omnipresent Hero
Wog refugee
posted April 25, 2016 03:22 PM

Warmonger said:
Well, this is simply taking bitmaps and bliting them in correct positions.


Hehe, yes bitmaps are easy once you have the stack type -just you dig in the cprthing.defs, the hard part is indeed stacks order, that puzzled me a lot.

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


Promising
Legendary Hero
fallen artist
posted April 25, 2016 05:51 PM
Edited by Warmonger at 07:28, 28 Apr 2016.

rottenvenetic said:
Hi, I'm just starting to figure the basics of VCMI out. Is there any way to stop it from putting files in the My Documents folder on the system drive? I really don't want to sift through there.

This is where VCMI keeps settings and installed mods on Windows. You can also keep own mods in local folder where VCMI is installed.
____________
The future of Heroes 3 is here!

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


Known Hero
Derusticated
posted April 25, 2016 09:39 PM

Understood. Can I tell it to schlep them somewhere else?
____________
In the darkness, a blind man is the best guide; in an age of madness, look to the madman to lead the way.

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


Famous Hero
DoR Dev Team
posted May 24, 2016 11:56 PM

I have a question, is it be possible with VCMI to add new spell schools (& respective skills for these schools)?

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


Supreme Hero
posted May 25, 2016 10:19 AM

Lord_Immortal said:
I have a question, is it be possible with VCMI to add new spell schools (& respective skills for these schools)?

There is one person that worked on secondary skills modding system. But I don't know current status.
About schools I asked. Think, that this can be easily programmed, if someone with take this feature to implement. It's only a matter or adding new bookmarks to spell book.

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


Adventuring Hero
posted June 07, 2016 11:10 PM

Any awesome news about VCMI?

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


Promising
Legendary Hero
fallen artist
posted June 08, 2016 07:23 AM

There were mods updates, inluding HoTA, bunch on little mods available via Launcher as well as 150 ported RMG templates.
____________
The future of Heroes 3 is here!

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

Tavern Dweller
posted June 19, 2016 05:22 PM
Edited by DarkEmblem at 18:43, 19 Jun 2016.

- The AI just creates heroes with only one stack of units. They don't have any heroes which carry more than 3 creature stacks.

-After assigning a second item to a commander, the game crashes (dragging and dropping an item on the commander button)

-My commander doesn't earn experience.

If it helps, there are a few crashdmps here:
http://www.mediafire.com/download/6nvul18xyc1br83/Crashdmp.rar


How do I fix these?

PS: The latest download release says 0.97, while the newest is 0.98g.

(Report a bug link doesn't work)
____________

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


Promising
Supreme Hero
posted June 19, 2016 09:37 PM

VCMI Team is not interested in WoG developing, so we must remain with commanders bugs.
____________

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


Promising
Legendary Hero
fallen artist
posted June 19, 2016 09:52 PM

It's more about players not interested in WoG development. Until last few weeks there were no bug reports or requests concerning WoG features. No mods for it, either.
____________
The future of Heroes 3 is here!

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


Admirable
Omnipresent Hero
Wog refugee
posted June 19, 2016 10:00 PM

hard to request wog working when vanilla isn't yet functional.
____________
Era II mods and utilities

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


Promising
Supreme Hero
posted June 19, 2016 10:42 PM

Warmonger said:
It's more about players not interested in WoG development. Until last few weeks there were no bug reports or requests concerning WoG features.

Still, reported bugs seem to pass unnoticed/unconfirmed.
http://bugs.vcmi.eu/view.php?id=2439
http://bugs.vcmi.eu/view.php?id=2430

It's regression. These features worked fine in earlier versions.

____________

 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 ... 75 76 77 78 79 ... 80 90 100 110 116 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0767 seconds