• Уважаемые гости и новички, приветствуем Вас на нашем форуме
    Здесь вы можете найти ответы практически на все свои вопросы о серии игр «Готика» (в том числе различных модах на нее), «Ведьмак», «Ризен», «Древние свитки», «Эра дракона» и о многих других играх. Можете также узнать свежие новости о разработке новых проектов, восхититься творчеством наших форумчан, либо самим показать, что вы умеете. Ну и наконец, можете обсудить общие увлечения или просто весело пообщаться с посетителями «Таверны».

    Чтобы получить возможность писать на форуме, оставьте сообщение в этой теме.
    Удачи!

Не стесняюсь спросить....

alexeich2019

Участник форума
Регистрация
28 Июн 2019
Сообщения
191
Благодарности
73
Баллы
125
Люди, кто разбирается в музыке, в игре, подскажите. Почему в DirectMusic Producer проигрывается нормально мелодия, а в игре остается какой-то огрызок? Мб в music.dat нужно что-то подшаманить? Так то, я ничего особенного в датнике не заметил. Создал свою инстанцию по образу и подобию, привязал сегмент. В зене создал oCMuzicZone, дал название по инстанции из датника. Музыка играет, но она... неполноценная. Как будто из оркестра убрали 3/4 исполнителей.
 

MEG@VOLT

★★★★★★★★★
ТехАдмин
Регистрация
24 Мар 2006
Сообщения
9.103
Благодарности
6.070
Баллы
1.565
Люди, кто разбирается в музыке, в игре, подскажите. Почему в DirectMusic Producer проигрывается нормально мелодия, а в игре остается какой-то огрызок? Мб в music.dat нужно что-то подшаманить? Так то, я ничего особенного в датнике не заметил. Создал свою инстанцию по образу и подобию, привязал сегмент. В зене создал oCMuzicZone, дал название по инстанции из датника. Музыка играет, но она... неполноценная. Как будто из оркестра убрали 3/4 исполнителей.
Честно не скажу. Единственное, что может быть. Музыка должна быть низкокачественной.
 

НастасьСанна

Участник форума
Регистрация
6 Дек 2012
Сообщения
351
Благодарности
521
Баллы
325
I would like Bandit 1 and Bandit 2 to attack ONLY Berko. However, they must attack simultaneously and MUST be in trigger (After the player enters the trigger, the bandits should attack the NPC - berko). The problem is that only one of the bandits attacks the other character.
Hello! This piece of code seems to be generally OK but variables Bdt1 and Bdt1 are written in lower case inside Npc_ClearAIQueue(bdt1) and Npc_ClearAIQueue(bdt2).

If it is not the reason, maybe something is wrong with the bandits' instances. Do they have different IDs? Starting routines? Perceptions enabled? Check if it is always the same bandit doesn't attack, or just one of them randomly? In game try to get the bandit in focus and press Shift+G to see info about his state - is he in Z_Attack or not, which perceptions are on.
 

alexeich2019

Участник форума
Регистрация
28 Июн 2019
Сообщения
191
Благодарности
73
Баллы
125
MEG@VOLT, это оригинальная музыка. Т.е. я открыл сегмент, прослушал его - убедился, что с ним все в порядке, сохранил с другим именем и ввел в игру. Прошлый сегмент тоже проигрывается криво... Блин, очень странно. У товарища есть сборка, где все проигрывается правильно. Но на большинстве других сборок - фигня какая-то. В чем разница непонятно.
 
Последнее редактирование:

MEG@VOLT

★★★★★★★★★
ТехАдмин
Регистрация
24 Мар 2006
Сообщения
9.103
Благодарности
6.070
Баллы
1.565
MEG@VOLT, это оригинальная музыка. Т.е. я открыл сегмент, прослушал его - убедился, что с ним все в порядке, сохранил с другим именем и ввел в игру. Прошлый сегмент тоже проигрывается криво... Блин, очень странно.
А сохранил через DMP?
Может в нем какой-то глюк?
Я честно не знаю, с музыкой не возился, только wav и mp3 в игру пихал, но они не правильно отигрывают, т.е. пока не закончится трек, он будет играть, не как с оригиналами, когда вышел из зоны, то музыки нет. Но это было лет 10 назад, с тех пор и не возился)
 

alexeich2019

Участник форума
Регистрация
28 Июн 2019
Сообщения
191
Благодарности
73
Баллы
125
MEG@VOLT, да. сохранял через DMP. Я то думал, что проблема в сегментах и раз в DMP проигрывается нормально, то заново сохраненный будет проигрываться в игре полноценно, но... Как показала практика - это фигня.
 

Fabiosek

Участник форума
Регистрация
17 Июн 2017
Сообщения
147
Благодарности
47
Баллы
190
Hello! This piece of code seems to be generally OK but variables Bdt1 and Bdt1 are written in lower case inside Npc_ClearAIQueue(bdt1) and Npc_ClearAIQueue(bdt2).

If it is not the reason, maybe something is wrong with the bandits' instances. Do they have different IDs? Starting routines? Perceptions enabled? Check if it is always the same bandit doesn't attack, or just one of them randomly? In game try to get the bandit in focus and press Shift+G to see info about his state - is he in Z_Attack or not, which perceptions are on.

1. Uppercase or lowercase variables do not matter - for consistency, it's better to have them all equally.
2. Yes, the bandits have different identifiers. Their starting routine is "TA_Stand_Guarding" - I don't change it, but it doesn't matter?
3. Only the first bandit ALWAYS (BAU_1040_Bandit_L) makes an attack.
4. Both bandits do not have npc type set, because with npc_type = 0, probably nobody attacks.
The same happens when they have npc_type. They both do not have a bandit guild, but they can have (only that they have to defeat ONLY, DO NOT KILL).

If it helps, it shows one bandit script (the other is "the same"):

CODE (BAU_1040_Bandit_L):
instance BAU_1040_Bandit_L (Npc_Default)
{
// ------ NSC ------
name = NAME_BANDIT;
guild = GIL_BAU;
id = 1040;
voice = 10;
flags = 0;

// ------ Attribute ------
B_SetAttributesToChapter (self, 4);

// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_NORMAL;

// ------ Equippte Waffen ------
//EquipItem (self, ItMw_1h_Bau_Mace);

// ------ Inventory ------
B_CreateAmbientInv (self);


// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_Fighter", Face_B_Normal01, BodyTex_B, ITAR_BDT_M);
Mdl_SetModelFatness (self, 0);
Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds");

// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);

// ------ Kampf-Talente ------
B_SetFightSkills (self, 30);

daily_routine = Rtn_Start_1040;
};
// ------ TA ------
FUNC VOID Rtn_Start_1040 ()
{
TA_Stand_Guarding (00,00,12,00,"WP_BANDIT_01");
TA_Stand_Guarding (12,00,00,00,"WP_BANDIT_01");
};
 
Последнее редактирование:

НастасьСанна

Участник форума
Регистрация
6 Дек 2012
Сообщения
351
Благодарности
521
Баллы
325
Fabiosek, Well, as it is the second bandit makes you troubles it would be better to see his script... Check his routine again, I once got an npc stuck without reacting anything because of a little mistype in his routine. Npstype = 0 is the same as NPCTYPE_AMBIENT, so it doesn't seem matter.

I can only suggest some more things to check. The first point to figure out is whether Bdt2 doesn't even enter the ZS_Attack state or he starts attack but suddenly stops (wrong target, interrupted, etc.). And if he has other reactions working properly.
1. Ingame, MARVIN mode on, get Bdt2 in focus and press Shift+G and T to see info about his state. Is he in ZS_Attack or not? Are any perceptions enabled? Also try attack him by yourself, he should normally fight you back.
2. In Berko_ATTACKED() check if Bdt2 is assigned properly - simply print Bdt2.name. If not look Startup.d - you maybe mistyped when inserted your bandits.
3. Add some debug output to ZS_Attack - print self.name, other.name and when the cycle ends.
 

Fabiosek

Участник форума
Регистрация
17 Июн 2017
Сообщения
147
Благодарности
47
Баллы
190
Fabiosek, Well, as it is the second bandit makes you troubles it would be better to see his script... Check his routine again, I once got an npc stuck without reacting anything because of a little mistype in his routine. Npstype = 0 is the same as NPCTYPE_AMBIENT, so it doesn't seem matter.

I can only suggest some more things to check. The first point to figure out is whether Bdt2 doesn't even enter the ZS_Attack state or he starts attack but suddenly stops (wrong target, interrupted, etc.). And if he has other reactions working properly.
1. Ingame, MARVIN mode on, get Bdt2 in focus and press Shift+G and T to see info about his state. Is he in ZS_Attack or not? Are any perceptions enabled? Also try attack him by yourself, he should normally fight you back.
2. In Berko_ATTACKED() check if Bdt2 is assigned properly - simply print Bdt2.name. If not look Startup.d - you maybe mistyped when inserted your bandits.
3. Add some debug output to ZS_Attack - print self.name, other.name and when the cycle ends.

CODE:
instance BAU_1041_Bandit_L (Npc_Default)
{
// ------ NSC ------
name = NAME_BANDIT;
guild = GIL_BAU;
id = 1041;
voice = 10;
flags = 0;

// ------ Attribute ------
B_SetAttributesToChapter (self, 4);

// ------ Kampf-Taktik ------
fight_tactic = FAI_HUMAN_NORMAL;

// ------ Equippte Waffen ------
//EquipItem (self, ItMw_1h_Bau_Mace);

// ------ Inventory ------
B_CreateAmbientInv (self);


// ------ visuals ------
B_SetNpcVisual (self, MALE, "Hum_Head_Fighter", Face_B_Normal01, BodyTex_B, ITAR_BDT_M);
Mdl_SetModelFatness (self, 0);
Mdl_ApplyOverlayMds (self, "Humans_Relaxed.mds");

// ------ NSC-relevante Talente vergeben ------
B_GiveNpcTalents (self);

// ------ Kampf-Talente ------
B_SetFightSkills (self, 30);

daily_routine = Rtn_Start_1041;
};
// ------ TA ------
FUNC VOID Rtn_Start_1041()
{
TA_Stand_Guarding (00,00,12,00,"WP_BANDIT_01");
TA_Stand_Guarding (12,00,00,00,"WP_BANDIT_01");
};

1. The bandit who attacks correctly goes into the ZS Attack state. The other bandit, who also has an established B_Attack, does absolutely nothing.
2. It correctly displays all names. I already did that. I wasn't wrong, if I was wrong, the bandits would not appear xD.
3. do you mean directly in the ZS Attack.d file?

PS. Now it doesn't work at all, even though I paste the same code as before. Npc (first bandit) attacks me (pc_hero) and not another npc (Berko). :C

Btw. thanks for your help. I am slowly beginning to lose hope that this is possible (in trigger).
Most of the very good Gothic programmers I know of have no idea how to solve this either. I have only this forum left (I've checked all possible - Polish forum, German forum ... xD)
 
Последнее редактирование:

НастасьСанна

Участник форума
Регистрация
6 Дек 2012
Сообщения
351
Благодарности
521
Баллы
325
1. The bandit who attacks correctly goes into the ZS Attack state. The other bandit, who also has an established B_Attack, does absolutely nothing.
2. It correctly displays all names. I already did that. I wasn't wrong, if I was wrong, the bandits would not appear xD.
3. do you mean directly in the ZS Attack.d file?
1. Is the silent bandit still in ZS_Stand_Guarding? If he doesn't attack there is still plenty things he can actually do. May you show the screenshot with his state?
2. You might insert BAU_1040_Bandit_L twice instead of inserting two different bandits. It is very simple reason to only one of them acting. And as you say that now the first bandit attacks hero instead of Berko it sounds like something is wrong with getting the instances into variables.
3. Yes. To see if the second bandit actually enters the state and got his target (other), or not. And when he leaves the state if he does.

Making NPSs act on your wish on trigger is surely possible, there is just seem to be some very little hidden mistake or unobvious condition that brakes your work.
 

Dimus

★★★★★★★★★
Супермодератор
Регистрация
19 Июл 2010
Сообщения
5.557
Благодарности
4.138
Баллы
915
Why did you tried to assign for the bandits (GIL_BDT) an another guild (GIL_BAU)? If you want to speak with bandits without his attack, just try to use in a their instances and daily routines the following flag:
Daedalus:
aivar[AIV_EnemyOverride] = TRUE;
Just see how this flag works, for example, instances and dialogues between the hero and the soldiers (Alvares and Engardo), who want to erpress a peasants from the Akil's farm. The same thing may be present in an instances and dialogues between the hero and militia guys (Rumbold and Rick), who want to erpress a peasants from the Bengar's farm.
In a NotR addon the hero may wear any bandit's armour (medium/heavy/Raven's guard).
 
Последнее редактирование:

Fabiosek

Участник форума
Регистрация
17 Июн 2017
Сообщения
147
Благодарности
47
Баллы
190
1. Is the silent bandit still in ZS_Stand_Guarding? If he doesn't attack there is still plenty things he can actually do. May you show the screenshot with his state?
2. You might insert BAU_1040_Bandit_L twice instead of inserting two different bandits. It is very simple reason to only one of them acting. And as you say that now the first bandit attacks hero instead of Berko it sounds like something is wrong with getting the instances into variables.
3. Yes. To see if the second bandit actually enters the state and got his target (other), or not. And when he leaves the state if he does.

Making NPSs act on your wish on trigger is surely possible, there is just seem to be some very little hidden mistake or unobvious condition that brakes your work.


Dimus because these "bandits" are just supposed to be called and look like that. After entering on trigger (berko_attacked func) both "bandits" are to attack and beat another character (Berko). There is no conversation there. This is a problem. I mean, it's supposed to be, but only after the bandits have beaten this NPC (Berko). Probably, if they have a bandit guild, they will always kill the character (PC_Hero/Berko is not to kill them, he is not able - he is too weak.)

НастасьСанна
1. Yes. He stands and does nothing.
2. But these characters must be different because they will be different in appearance. I don't know why nothing works anymore xD. I've changed their names for easier verification.

BAU_1040_Bandit_L:

BAU_1041_Bandit_L:

3. I checked - other.name and self.name. It displayed "Bandit 1" and "Berko". It's very strange, but Bandit 1 now correctly attacked xD (BAU_1040_Bandit_L attacked Berko).
Maybe changing "name" helped? Because I just did it.

But I'm still at the starting point.

As for perception - I checked with SHIFT + G and T, they seem to be. Bandit 2 doesn't care if I attacked him. It does nothing to me. He reacts when I draw my weapon.
 
Последнее редактирование:

НастасьСанна

Участник форума
Регистрация
6 Дек 2012
Сообщения
351
Благодарности
521
Баллы
325
Fabiosek, I've tested your scripts and found a solution. Just set AIV_LASTTARGET before calling B_Attack:
Daedalus:
        //Bdt1 attack Berko
        Bdt1.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID(Berko);
        B_Attack (Bdt1, Berko, AR_NONE, 0);
        //Bdt2 attack Berko
        Bdt2.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID(Berko);
        B_Attack (Bdt2, Berko, AR_NONE, 0);

Here is reasoning:
I've covered B_Attack and ZS_Attack with debug messages and found out that while in B_Attack slf and oth are correct, in ZS_Attack the other is not set properly. Usually it fails for the second bandit, but sometimes for the first or for both of them.
In B_Attack the line Npc_SetTarget(slf,oth); should theoretically initialize other, but it doesn't (I don't know why, it seems to never work as I wanted in my scripts).
We also have B_ValidateOther() function to fill missing other, and it takes his instance from AIV_LASTTARGET - so here is solution.

P.S. Вывод для русскоговорящих. Если нужно, чтобы один NPC атаковал другого NPC, особенно вне диалогов, перед вызовом B_Attack задайте значение переменной AIV_LASTTARGET. По неясным причинам в скриптах иногда неверно определяется цель атаки, и NPC не хотят нападать друг на друга.
И осторожнее с Npc_SetTarget - она не всегда правильно устанавливает переменную other.
 

Fabiosek

Участник форума
Регистрация
17 Июн 2017
Сообщения
147
Благодарности
47
Баллы
190
Fabiosek, I've tested your scripts and found a solution. Just set AIV_LASTTARGET before calling B_Attack:
Daedalus:
        //Bdt1 attack Berko
        Bdt1.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID(Berko);
        B_Attack (Bdt1, Berko, AR_NONE, 0);
        //Bdt2 attack Berko
        Bdt2.aivar[AIV_LASTTARGET] = Hlp_GetInstanceID(Berko);
        B_Attack (Bdt2, Berko, AR_NONE, 0);

Here is reasoning:
I've covered B_Attack and ZS_Attack with debug messages and found out that while in B_Attack slf and oth are correct, in ZS_Attack the other is not set properly. Usually it fails for the second bandit, but sometimes for the first or for both of them.
In B_Attack the line Npc_SetTarget(slf,oth); should theoretically initialize other, but it doesn't (I don't know why, it seems to never work as I wanted in my scripts).
We also have B_ValidateOther() function to fill missing other, and it takes his instance from AIV_LASTTARGET - so here is solution.

P.S. Вывод для русскоговорящих. Если нужно, чтобы один NPC атаковал другого NPC, особенно вне диалогов, перед вызовом B_Attack задайте значение переменной AIV_LASTTARGET. По неясным причинам в скриптах иногда неверно определяется цель атаки, и NPC не хотят нападать друг на друга.
И осторожнее с Npc_SetTarget - она не всегда правильно устанавливает переменную other.

Thanks man, you helped me. It works!
 

N1kX


Модостроитель
Регистрация
13 Ноя 2009
Сообщения
5.817
Благодарности
5.221
Баллы
910
Дизайнеры или близкие к ним, нужна помощь в поиске родного или близкого шрифта. Вот примеры (хочется сохранить родные, а не использовать ужасные от локализации снежков или руссобит-м)
Текстуры в формате tga

Это шрифты Г2а
 

Вложения

  • TEXTURES.zip
    50,4 KB · Просмотры: 16
Последнее редактирование:

MaGoth

★★★★★★★★★★★
Администратор
Регистрация
7 Янв 2003
Сообщения
19.371
Благодарности
7.801
Баллы
995
а картинки их есть ? а то глянуть сейчас не в чем..
вообще по готе ситуация с фонтами аховая, практически все отретрейсены и исполнены через жопу были.. даже у РВ оригиналов не сохранилось на сколько я знаю, ибо спрашивал когда-то давно..
потому и для сиквела свой делал снуля, вместо оригинального папируса..
 

N1kX


Модостроитель
Регистрация
13 Ноя 2009
Сообщения
5.817
Благодарности
5.221
Баллы
910
Я уже сделал их все... было ещё то мучение. Движок настолько криво компилит fnt, что не стал париться и использовал свои шрифты от другого перевода.
И да, это все делал под Г1, в Г2 может получше, но проверять не хочется :)
 

MaGoth

★★★★★★★★★★★
Администратор
Регистрация
7 Янв 2003
Сообщения
19.371
Благодарности
7.801
Баллы
995
в смысле сделал ? виндовые трушные опентайп ?! или в фонт-тарге ковырялся выставляя кривые лигатуры ??
 

N1kX


Модостроитель
Регистрация
13 Ноя 2009
Сообщения
5.817
Благодарности
5.221
Баллы
910
Использовал исходные от Г2 (В моде использовались они) и доделывал через Фотошоп.
Я просто за 3 года забыл откуда они брались в моде, поэтому приходится с нуля делать перевод мода.
 

MaGoth

★★★★★★★★★★★
Администратор
Регистрация
7 Янв 2003
Сообщения
19.371
Благодарности
7.801
Баллы
995
яснопонятно. а что за мод ?
 
Сверху Снизу